Skip to content

Commit

Permalink
Add a getName accessor for ModuleMacros.
Browse files Browse the repository at this point in the history
Swift would like to be able to access the name of a ModuleMacro.
There was some discussion of this in
apple/swift-clang#93, suggesting that it makes
sense to have this accessor in Clang.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@310622 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
bwilson committed Aug 10, 2017
1 parent 2a34fe5 commit 7527016
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/clang/Lex/MacroInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,9 @@ class ModuleMacro : public llvm::FoldingSetNode {
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; }

Expand Down

0 comments on commit 7527016

Please sign in to comment.