[PATCH] D83172: [Attributor] Create getter function for the ID of the abstract attribute

Luofan Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 5 04:47:58 PDT 2020


bbn added a comment.

> Attributes are going to be decleared outside of the Attributor soon.

Do you mean that there might be other abstract attributes defined outside the AttributorAttributes.cpp ?

> so I think we can have a macro like this:
> 
>   #define ATTRIBUTE_BOILER(CLASS)                    \
>       const char *getIdAddr() { return &ID}                 \
>       const std::string getName() { return #CLASS;}   \
>       static const char ID;                                         

Yes this could work, but I am still unsure about it..... I'd also like to hear what others think about this.


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

https://reviews.llvm.org/D83172





More information about the llvm-commits mailing list