diff options
author | Chris Lattner <sabre@nondot.org> | 2006-07-26 05:22:49 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-07-26 05:22:49 +0000 |
commit | c1410dc1e616841a8483a4849ecdc664df0d7219 (patch) | |
tree | fd16bb87f6465fd888f48d4d4fdff097de4aa69a /clang/Lex/Preprocessor.cpp | |
parent | 6fc08bc77dcef105acf197836f40b3a96e8daa01 (diff) | |
download | bcm5719-llvm-c1410dc1e616841a8483a4849ecdc664df0d7219.tar.gz bcm5719-llvm-c1410dc1e616841a8483a4849ecdc664df0d7219.zip |
Change MacroArgs to allocate space for the unexpanded tokens immediately after
the MacroArgs object itself. This is a bit more efficient and will be even more
so shortly.
llvm-svn: 38756
Diffstat (limited to 'clang/Lex/Preprocessor.cpp')
-rw-r--r-- | clang/Lex/Preprocessor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/Lex/Preprocessor.cpp b/clang/Lex/Preprocessor.cpp index 28414d3707c..71f315d03d8 100644 --- a/clang/Lex/Preprocessor.cpp +++ b/clang/Lex/Preprocessor.cpp @@ -627,7 +627,7 @@ bool Preprocessor::HandleMacroExpandedIdentifier(LexerToken &Identifier, // expansion stack, only to take it right back off. if (MI->getNumTokens() == 0) { // No need for arg info. - delete Args; + if (Args) Args->destroy(); // Ignore this macro use, just return the next token in the current // buffer. @@ -808,7 +808,7 @@ MacroArgs *Preprocessor::ReadFunctionLikeMacroArgs(LexerToken &MacroName, } } - return new MacroArgs(MI, ArgTokens); + return MacroArgs::create(MI, ArgTokens); } /// ComputeDATE_TIME - Compute the current time, enter it into the specified |