[PATCH] D106615: [Clang][LLVM] generate btf_tag annotations for DIComposite types
David Blaikie via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 17 18:10:32 PDT 2021
dblaikie added a comment.
In D106615#2950964 <https://reviews.llvm.org/D106615#2950964>, @yonghong-song wrote:
> The attributes should be revolved during semantic analysis stage. So looks like replace-style attribute setting is not really needed. I will change to add attribute parameter during creation time. Thanks for suggestion.
I think semantic analysis runs alongside code generation - eg, if you have one attribute applied to a declaration, then a function definition using that type, then another declaration of the same type, but with a different attribute, then another function definition using the type - if you build the type only once, on the first use, you might not capture all the attributes?
Anyway, yeah, if all this works out without the replacement style API, I /think/ that's probably the better call. Might be worth including a test like that to show how it's expected to be handled.
(do these attributes need to work on declared-but-not-defined types? (eg: a type declared, and then a function that takes pointer-to that type, but the type is never defined in this translation unit) If so, could you include testing. for that situation?)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106615/new/
https://reviews.llvm.org/D106615
More information about the cfe-commits
mailing list