diff options
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Lex/MacroInfo.cpp')
-rw-r--r-- | contrib/llvm/tools/clang/lib/Lex/MacroInfo.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/contrib/llvm/tools/clang/lib/Lex/MacroInfo.cpp b/contrib/llvm/tools/clang/lib/Lex/MacroInfo.cpp index 5416886..109b6c1 100644 --- a/contrib/llvm/tools/clang/lib/Lex/MacroInfo.cpp +++ b/contrib/llvm/tools/clang/lib/Lex/MacroInfo.cpp @@ -218,13 +218,9 @@ void MacroDirective::dump() const { if (auto *Prev = getPrevious()) Out << " prev " << Prev; if (IsFromPCH) Out << " from_pch"; - if (IsImported) Out << " imported"; - if (IsAmbiguous) Out << " ambiguous"; - if (IsPublic) - Out << " public"; - else if (isa<VisibilityMacroDirective>(this)) - Out << " private"; + if (isa<VisibilityMacroDirective>(this)) + Out << (IsPublic ? " public" : " private"); if (auto *DMD = dyn_cast<DefMacroDirective>(this)) { if (auto *Info = DMD->getInfo()) { @@ -234,3 +230,12 @@ void MacroDirective::dump() const { } Out << "\n"; } + +ModuleMacro *ModuleMacro::create(Preprocessor &PP, Module *OwningModule, + IdentifierInfo *II, MacroInfo *Macro, + ArrayRef<ModuleMacro *> Overrides) { + void *Mem = PP.getPreprocessorAllocator().Allocate( + sizeof(ModuleMacro) + sizeof(ModuleMacro *) * Overrides.size(), + llvm::alignOf<ModuleMacro>()); + return new (Mem) ModuleMacro(OwningModule, II, Macro, Overrides); +} |