summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/MacroInfo.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-04-22 00:26:11 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-04-22 00:26:11 +0000
commite56c8bc30eedf02be9558a90a788600b49e24873 (patch)
treeaa3f8c49f856b65e7d2fa8a5c57c470e1c400e32 /clang/lib/Lex/MacroInfo.cpp
parentfe1365ac50d39e837bbe2172efeff890cf53915b (diff)
downloadbcm5719-llvm-e56c8bc30eedf02be9558a90a788600b49e24873.tar.gz
bcm5719-llvm-e56c8bc30eedf02be9558a90a788600b49e24873.zip
[modules] Build a DAG of module macros for each identifier.
This graph will be used to determine the current set of active macros. This is foundation work for getting macro visibility correct across submodules of the current module. No functionality change for now. llvm-svn: 235461
Diffstat (limited to 'clang/lib/Lex/MacroInfo.cpp')
-rw-r--r--clang/lib/Lex/MacroInfo.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Lex/MacroInfo.cpp b/clang/lib/Lex/MacroInfo.cpp
index 5416886cc9f..046948397fd 100644
--- a/clang/lib/Lex/MacroInfo.cpp
+++ b/clang/lib/Lex/MacroInfo.cpp
@@ -234,3 +234,10 @@ void MacroDirective::dump() const {
}
Out << "\n";
}
+
+ModuleMacro *ModuleMacro::create(Preprocessor &PP, unsigned OwningModuleID,
+ IdentifierInfo *II, MacroInfo *Macro,
+ ArrayRef<ModuleMacro*> Overrides) {
+ return new (PP.getPreprocessorAllocator())
+ ModuleMacro(OwningModuleID, II, Macro, Overrides);
+}
OpenPOWER on IntegriCloud