This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Implement the SubElement interfaces for the builtin locations
ClosedPublic

Authored by rriddle on Oct 20 2022, 5:57 PM.

Details

Summary

This enables find/replace of nested components for location attributes.

Depends on D136407

Diff Detail

Event Timeline

rriddle created this revision.Oct 20 2022, 5:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 20 2022, 5:57 PM
rriddle requested review of this revision.Oct 20 2022, 5:57 PM
Mogball accepted this revision.Oct 20 2022, 6:30 PM
Mogball added inline comments.
mlir/include/mlir/IR/BuiltinLocationAttributes.td
32

Could this be added to the base class if they all implement it?

mlir/lib/IR/Location.cpp
152

Can you spell out this auto

This revision is now accepted and ready to land.Oct 20 2022, 6:30 PM
rriddle marked 2 inline comments as done.Oct 21 2022, 11:14 AM
rriddle added inline comments.
mlir/include/mlir/IR/BuiltinLocationAttributes.td
32

Not all of them implement it (e.g. FileLineColLoc, UnknownLoc).

This revision was automatically updated to reflect the committed changes.
rriddle marked an inline comment as done.