[PATCH] D110127: [Clang] Support typedef with btf_tag attributes

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 22 13:08:30 PDT 2021


aaron.ballman added a comment.

In D110127#3013391 <https://reviews.llvm.org/D110127#3013391>, @dblaikie wrote:

> Given this is about being preserved into debug info - I imagine it'll have the same behavior as using a typedef in a function return type - whenever that currently shows up in the DWARF, this attribute would. Where it doesn't, this doesn't.
>
> So I wouldn't expect this feature to do any checking/require the typedef to be used consistently - but fair questions to consider.

In that case, I'd assume this is a declaration attribute that appertains to the declaration of the typedef, and not to the underlying type. Basically, it sounds like this models more closely to the `nodebug` attribute than the `address_space` attribute: https://godbolt.org/z/zoo1xnG4n

(This matters because of the `[[clang::btf_tag(...)]]` spelling that's used in C2x.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110127/new/

https://reviews.llvm.org/D110127



More information about the cfe-commits mailing list