[cfe-commits] r59842 - /cfe/trunk/lib/Lex/PPLexerChange.cpp

Ted Kremenek kremenek at apple.com
Fri Nov 21 12:51:18 PST 2008


Author: kremenek
Date: Fri Nov 21 14:51:15 2008
New Revision: 59842

URL: http://llvm.org/viewvc/llvm-project?rev=59842&view=rev
Log:
When creating the raw tokens for PTHLexer, make sure the token representing the file to include is checked for being an identifier.

Modified:
    cfe/trunk/lib/Lex/PPLexerChange.cpp

Modified: cfe/trunk/lib/Lex/PPLexerChange.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPLexerChange.cpp?rev=59842&r1=59841&r2=59842&view=diff

==============================================================================
--- cfe/trunk/lib/Lex/PPLexerChange.cpp (original)
+++ cfe/trunk/lib/Lex/PPLexerChange.cpp Fri Nov 21 14:51:15 2008
@@ -74,7 +74,7 @@
   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 @@
         L.ParsingPreprocessorDirective = true;
         L.LexIncludeFilename(Tok); 
         L.ParsingPreprocessorDirective = false;
+        
+        if (Tok.is(tok::identifier))
+          Tok.setIdentifierInfo(LookUpIdentifierInfo(Tok));
       }
     }    
   }





More information about the cfe-commits mailing list