diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-11-20 01:45:11 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-11-20 01:45:11 +0000 |
commit | 300590b5841d462e7c6373a16ba999aaa455e1e2 (patch) | |
tree | 9b8125f53c61fcd75c68fead9f6fd633a0b6f30f /clang/lib/Lex/Pragma.cpp | |
parent | 866b0348398ad482284cc2b474d19a4e6c261992 (diff) | |
download | bcm5719-llvm-300590b5841d462e7c6373a16ba999aaa455e1e2.tar.gz bcm5719-llvm-300590b5841d462e7c6373a16ba999aaa455e1e2.zip |
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.
llvm-svn: 59693
Diffstat (limited to 'clang/lib/Lex/Pragma.cpp')
-rw-r--r-- | clang/lib/Lex/Pragma.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Lex/Pragma.cpp b/clang/lib/Lex/Pragma.cpp index 5e6de0ffc3c..961c0f9e6f3 100644 --- a/clang/lib/Lex/Pragma.cpp +++ b/clang/lib/Lex/Pragma.cpp @@ -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); } |