diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-11-21 20:51:15 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-11-21 20:51:15 +0000 |
commit | b6209858cb81107e8345af2a78a3881c795056a8 (patch) | |
tree | 599a2dc3c06bc2a8b72f10aad086365e82053192 /clang/lib/Lex/PPLexerChange.cpp | |
parent | cb181bb203085f863ee89eabdb75eb0778c5e2f5 (diff) | |
download | bcm5719-llvm-b6209858cb81107e8345af2a78a3881c795056a8.tar.gz bcm5719-llvm-b6209858cb81107e8345af2a78a3881c795056a8.zip |
When creating the raw tokens for PTHLexer, make sure the token representing the file to include is checked for being an identifier.
llvm-svn: 59842
Diffstat (limited to 'clang/lib/Lex/PPLexerChange.cpp')
-rw-r--r-- | clang/lib/Lex/PPLexerChange.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Lex/PPLexerChange.cpp b/clang/lib/Lex/PPLexerChange.cpp index da877493a0f..e755edb55e0 100644 --- a/clang/lib/Lex/PPLexerChange.cpp +++ b/clang/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)); } } } |