[cfe-commits] r59693 - /cfe/trunk/lib/Lex/Pragma.cpp

Ted Kremenek kremenek at apple.com
Wed Nov 19 17:45:11 PST 2008


Author: kremenek
Date: Wed Nov 19 19:45:11 2008
New Revision: 59693

URL: http://llvm.org/viewvc/llvm-project?rev=59693&view=rev
Log:
Just use the SourceLocation of SysHeaderTok when doing a callback to emit #line
information. A diff of the -E output for Cocoa.h shows that there is no change
in output.

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

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

==============================================================================
--- cfe/trunk/lib/Lex/Pragma.cpp (original)
+++ cfe/trunk/lib/Lex/Pragma.cpp Wed Nov 19 19:45:11 2008
@@ -248,7 +248,7 @@
   }
   
   // Get the current file lexer we're looking at.  Ignore _Pragma 'files' etc.
-  Lexer *TheLexer = getCurrentFileLexer();
+  PreprocessorLexer *TheLexer = getCurrentFileLexer();
   
   // Mark the file as a system header.
   const FileEntry *File = SourceMgr.getFileEntryForID(TheLexer->getFileID());
@@ -256,7 +256,7 @@
   
   // Notify the client, if desired, that we are in a new source file.
   if (Callbacks)
-    Callbacks->FileChanged(TheLexer->getSourceLocation(TheLexer->BufferPtr),
+    Callbacks->FileChanged(SysHeaderTok.getLocation(),
                            PPCallbacks::SystemHeaderPragma, SrcMgr::C_System);
 }
 





More information about the cfe-commits mailing list