From: Bob Wilson Date: Thu, 10 Aug 2017 16:42:46 +0000 (+0000) Subject: Add a getName accessor for ModuleMacros. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=15af0ebfc46eb2d4fdb8303c816df18fb4a40924;p=clang 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310622 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Lex/MacroInfo.h b/include/clang/Lex/MacroInfo.h index d25431b55f..47f10d6e76 100644 --- a/include/clang/Lex/MacroInfo.h +++ b/include/clang/Lex/MacroInfo.h @@ -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; }