diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2015-05-27 18:47:56 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2015-05-27 18:47:56 +0000 | 
| commit | 5e20cdd81c44a443562a09007668ffdf76c455af (patch) | |
| tree | dbbd4047878da71c1a706e26ce05b4e7791b14cc /lib/Lex/MacroInfo.cpp | |
| parent | d5f23b0b7528b5c3caed1ba14f897cc4aaa9e3c3 (diff) | |
Notes
Diffstat (limited to 'lib/Lex/MacroInfo.cpp')
| -rw-r--r-- | lib/Lex/MacroInfo.cpp | 17 | 
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/Lex/MacroInfo.cpp b/lib/Lex/MacroInfo.cpp index 5416886cc9f7..109b6c12b89b 100644 --- a/lib/Lex/MacroInfo.cpp +++ b/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); +}  | 
