Author: bwilson
Date: Thu Aug 10 09:42:46 2017
New Revision: 310622

URL: http://llvm.org/viewvc/llvm-project?rev=310622&view=rev
Log:
Add a getName accessor for ModuleMacros.

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.

Modified:
    cfe/trunk/include/clang/Lex/MacroInfo.h

Modified: cfe/trunk/include/clang/Lex/MacroInfo.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/MacroInfo.h?rev=310622&r1=310621&r2=310622&view=diff
==============================================================================
--- cfe/trunk/include/clang/Lex/MacroInfo.h (original)
+++ cfe/trunk/include/clang/Lex/MacroInfo.h Thu Aug 10 09:42:46 2017
@@ -510,6 +510,9 @@ public:
     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

Reply via email to