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

Kuter Dinel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 5 03:12:22 PDT 2020


kuter added a comment.

In D83172#2131751 <https://reviews.llvm.org/D83172#2131751>, @bbn wrote:

> @kuter Do you mean we can use macro inside the header file? for example, we create such macro and use it inside the declaration of the class, but I still think it is not clean.


I was think of having a macro inside the head file.
Attributes are going to be decleared outside of the Attributor soon.

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;                                         


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

https://reviews.llvm.org/D83172





More information about the llvm-commits mailing list