[PATCH] D134087: [TableGen] Track reference locations of Records/RecordVals
River Riddle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 17 13:30:22 PDT 2022
rriddle added a comment.
In D134087#3797798 <https://reviews.llvm.org/D134087#3797798>, @lattner wrote:
> Very cool, it'd be great to improve this in tblgen!
>
> I'm a long way from working on this code, but the representation is a bit odd. Typically you'd put a location on `VarInit` when forming the `VarInit::get`. Having a location on this would enable far better diagnostics across all of tblgen.
>
> That said, it would make the jump to definition implementation slightly more awkward, because it has to scan the AST to find references, instead of having them on the declaration. I'm concerned that taking a step like in this patch would be a sideways step for improving tblgen though.
The problem that I ran into was that a lot of stuff kind of requires that the Inits get folded and are uniqued, which would no longer be the case if we put locations on them. From there this patch arose, because I didn't want to broach the "rewrite the world" just to get better locations.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134087/new/
https://reviews.llvm.org/D134087
More information about the llvm-commits
mailing list