summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/TokenLexer.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
commit357b57d7492813fcad9fbaa7fbd0253c3b3dfa81 (patch)
tree4748fe060974c1720a2557ea91e4682e1055d128 /clang/lib/Lex/TokenLexer.cpp
parent7e20927756bc885a1d1cbd2a2c904c09b1260ef8 (diff)
downloadbcm5719-llvm-357b57d7492813fcad9fbaa7fbd0253c3b3dfa81.tar.gz
bcm5719-llvm-357b57d7492813fcad9fbaa7fbd0253c3b3dfa81.zip
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. llvm-svn: 63036
Diffstat (limited to 'clang/lib/Lex/TokenLexer.cpp')
-rw-r--r--clang/lib/Lex/TokenLexer.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/clang/lib/Lex/TokenLexer.cpp b/clang/lib/Lex/TokenLexer.cpp
index 7ae61beb888..40f6640cd75 100644
--- a/clang/lib/Lex/TokenLexer.cpp
+++ b/clang/lib/Lex/TokenLexer.cpp
@@ -33,12 +33,6 @@ void TokenLexer::Init(Token &Tok, MacroArgs *Actuals) {
CurToken = 0;
InstantiateLoc = Tok.getLocation();
-
- // If the instantiation loc is not already a FileID, resolve it here. If we
- // don't do this, we end up doing it once per token lexed.
- if (!InstantiateLoc.isFileID())
- InstantiateLoc = PP.getSourceManager().getInstantiationLoc(InstantiateLoc);
-
AtStartOfLine = Tok.isAtStartOfLine();
HasLeadingSpace = Tok.hasLeadingSpace();
Tokens = &*Macro->tokens_begin();
OpenPOWER on IntegriCloud