bob.wilson created this revision. Herald added a subscriber: mcrosier. Swift would like to be able to access the name of a ModuleMacro. There was some discussion of this in https://github.com/apple/swift-clang/pull/93, suggesting that it makes sense to have this accessor in Clang.
https://reviews.llvm.org/D36563 Files: clang/Lex/MacroInfo.h Index: clang/Lex/MacroInfo.h =================================================================== --- clang/Lex/MacroInfo.h +++ clang/Lex/MacroInfo.h @@ -510,6 +510,9 @@ ID.AddPointer(II); } + /// Get the name of the macro. + IdentifierInfo *getName() const { return II; } + /// Get the ID of the module that exports this macro. Module *getOwningModule() const { return OwningModule; }
Index: clang/Lex/MacroInfo.h =================================================================== --- clang/Lex/MacroInfo.h +++ clang/Lex/MacroInfo.h @@ -510,6 +510,9 @@ ID.AddPointer(II); } + /// Get the name of the macro. + IdentifierInfo *getName() const { return II; } + /// Get the ID of the module that exports this macro. Module *getOwningModule() const { return OwningModule; }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits