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
This commit is contained in:
Ted Kremenek 2008-11-20 01:45:11 +00:00
parent 866b034839
commit 300590b584
1 changed files with 2 additions and 2 deletions

View 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);
}