[PATCH] D36563: Add a getName accessor for ModuleMacros
Bob Wilson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 9 17:21:09 PDT 2017
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; }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36563.110508.patch
Type: text/x-patch
Size: 405 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170810/801c2253/attachment.bin>
More information about the cfe-commits
mailing list