aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/PPLexerChange.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-11-21 20:51:15 +0000
committerTed Kremenek <kremenek@apple.com>2008-11-21 20:51:15 +0000
commitd5a8f0bde67505851e0fa264e1ec4de8de8f5bc2 (patch)
tree6efc16a667685f83606e31755ee0531e9e5d40e9 /lib/Lex/PPLexerChange.cpp
parentc840f0cbd9552a28adc548ee353303c4b838f61c (diff)
When creating the raw tokens for PTHLexer, make sure the token representing the file to include is checked for being an identifier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59842 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PPLexerChange.cpp')
-rw-r--r--lib/Lex/PPLexerChange.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Lex/PPLexerChange.cpp b/lib/Lex/PPLexerChange.cpp
index da877493a0..e755edb55e 100644
--- a/lib/Lex/PPLexerChange.cpp
+++ b/lib/Lex/PPLexerChange.cpp
@@ -74,7 +74,7 @@ void Preprocessor::EnterSourceFile(unsigned FileID,
if (MaxIncludeStackDepth < IncludeMacroStack.size())
MaxIncludeStackDepth = IncludeMacroStack.size();
-#if 1
+#if 0
Lexer *TheLexer = new Lexer(SourceLocation::getFileLoc(FileID, 0), *this);
EnterSourceFileWithLexer(TheLexer, CurDir);
#else
@@ -122,6 +122,9 @@ void Preprocessor::EnterSourceFile(unsigned FileID,
L.ParsingPreprocessorDirective = true;
L.LexIncludeFilename(Tok);
L.ParsingPreprocessorDirective = false;
+
+ if (Tok.is(tok::identifier))
+ Tok.setIdentifierInfo(LookUpIdentifierInfo(Tok));
}
}
}