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.

llvm-svn: 310622
This commit is contained in:
Bob Wilson 2017-08-10 16:42:46 +00:00
parent 719e22d4f4
commit 7a85cc52d7
1 changed files with 3 additions and 0 deletions

View File

@ -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; }