switch the macroinfo argument lists from being allocated off the heap
to being allocated from the same bumpptr that the MacroInfo objects
themselves are.
This speeds up -Eonly cocoa.h pth by ~4%, fsyntax-only is barely measurable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65195 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Lex/PPDirectives.cpp b/lib/Lex/PPDirectives.cpp
index e6b2f84..ce68207 100644
--- a/lib/Lex/PPDirectives.cpp
+++ b/lib/Lex/PPDirectives.cpp
@@ -40,7 +40,7 @@
/// be reused for allocating new MacroInfo objects.
void Preprocessor::ReleaseMacroInfo(MacroInfo* MI) {
MICache.push_back(MI);
- MI->FreeArgumentList();
+ MI->FreeArgumentList(BP);
}
@@ -1115,7 +1115,7 @@
// Add the __VA_ARGS__ identifier as an argument.
Arguments.push_back(Ident__VA_ARGS__);
MI->setIsC99Varargs();
- MI->setArgumentList(&Arguments[0], Arguments.size());
+ MI->setArgumentList(&Arguments[0], Arguments.size(), BP);
return false;
case tok::eom: // #define X(
Diag(Tok, diag::err_pp_missing_rparen_in_macro_def);
@@ -1149,7 +1149,7 @@
Diag(Tok, diag::err_pp_expected_comma_in_arg_list);
return true;
case tok::r_paren: // #define X(A)
- MI->setArgumentList(&Arguments[0], Arguments.size());
+ MI->setArgumentList(&Arguments[0], Arguments.size(), BP);
return false;
case tok::comma: // #define X(A,
break;
@@ -1165,7 +1165,7 @@
}
MI->setIsGNUVarargs();
- MI->setArgumentList(&Arguments[0], Arguments.size());
+ MI->setArgumentList(&Arguments[0], Arguments.size(), BP);
return false;
}
}