]> granicus.if.org Git - clang/commitdiff
Just use the SourceLocation of SysHeaderTok when doing a callback to emit #line
authorTed Kremenek <kremenek@apple.com>
Thu, 20 Nov 2008 01:45:11 +0000 (01:45 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 20 Nov 2008 01:45:11 +0000 (01:45 +0000)
information. A diff of the -E output for Cocoa.h shows that there is no change
in output.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59693 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/Pragma.cpp

index 5e6de0ffc3c8130ad34c7adcd8aa8497d3616248..961c0f9e6f3b81ff49c8f6833ba8d79c8e5c4499 100644 (file)
@@ -248,7 +248,7 @@ void Preprocessor::HandlePragmaSystemHeader(Token &SysHeaderTok) {
   }
   
   // 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 @@ void Preprocessor::HandlePragmaSystemHeader(Token &SysHeaderTok) {
   
   // 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);
 }