aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/MacroArgs.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-01-26 20:24:53 +0000
committerChris Lattner <sabre@nondot.org>2009-01-26 20:24:53 +0000
commite7689886d6a68507ae90ca330bd24bf89d4d6df1 (patch)
tree6a42960ea029751f41f5c18c7a1f3299863448bc /lib/Lex/MacroArgs.cpp
parent071831dcc7fb502d8957535366baa6ac7f72e70d (diff)
remove my hacks that aggressively threw away multiple
instantiation history in an effort to speed up c99-intconst-1.c. Now that multiple nested instantiations are allowed, we just make them and don't pay the cost of lookups. With the other changes that went in before this, reverting this is actually a speedup for c99-intconst-1.c, speeding it up from 1.96s to 1.80s, and preserves much better loc info. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63036 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/MacroArgs.cpp')
-rw-r--r--lib/Lex/MacroArgs.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/Lex/MacroArgs.cpp b/lib/Lex/MacroArgs.cpp
index c3d7738afe..7a805f349f 100644
--- a/lib/Lex/MacroArgs.cpp
+++ b/lib/Lex/MacroArgs.cpp
@@ -120,12 +120,6 @@ MacroArgs::getPreExpArgument(unsigned Arg, Preprocessor &PP) {
Result.push_back(Token());
Token &Tok = Result.back();
PP.Lex(Tok);
-
- // Eagerly resolve instantiation ID's to their spelling location. This
- // makes it so we only have to get the spelling loc once per macro argument
- // preexpansion instead of once per each time the token is expanded.
- if (!Tok.getLocation().isFileID())
- Tok.setLocation(PP.getSourceManager().getSpellingLoc(Tok.getLocation()));
} while (Result.back().isNot(tok::eof));
// Pop the token stream off the top of the stack. We know that the internal