diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-11-19 22:55:25 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-11-19 22:55:25 +0000 |
commit | ac80c6e06b5815228e46294e51c493a74a21f8bc (patch) | |
tree | 4e2d1af52923e0eadba88e686c3aba5781f166e9 /lib/Lex/Pragma.cpp | |
parent | 1a531570d294ffc300cce1bc5e73de847a370f4f (diff) |
Use PreprocessorLexer::getFileID() instead of Lexer::getFileLoc(). This is an intermediate step to having getCurrentLexer() return a PreprocessorLexer* instead of a Lexer*.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59672 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Pragma.cpp')
-rw-r--r-- | lib/Lex/Pragma.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Lex/Pragma.cpp b/lib/Lex/Pragma.cpp index 0e0841da9a..5e6de0ffc3 100644 --- a/lib/Lex/Pragma.cpp +++ b/lib/Lex/Pragma.cpp @@ -186,10 +186,10 @@ void Preprocessor::HandlePragmaOnce(Token &OnceTok) { } // Get the current file lexer we're looking at. Ignore _Pragma 'files' etc. - SourceLocation FileLoc = getCurrentFileLexer()->getFileLoc(); + unsigned FileID = getCurrentFileLexer()->getFileID(); // Mark the file as a once-only file now. - HeaderInfo.MarkFileIncludeOnce(SourceMgr.getFileEntryForLoc(FileLoc)); + HeaderInfo.MarkFileIncludeOnce(SourceMgr.getFileEntryForID(FileID)); } void Preprocessor::HandlePragmaMark() { @@ -251,7 +251,7 @@ void Preprocessor::HandlePragmaSystemHeader(Token &SysHeaderTok) { Lexer *TheLexer = getCurrentFileLexer(); // Mark the file as a system header. - const FileEntry *File = SourceMgr.getFileEntryForLoc(TheLexer->getFileLoc()); + const FileEntry *File = SourceMgr.getFileEntryForID(TheLexer->getFileID()); HeaderInfo.MarkFileSystemHeader(File); // Notify the client, if desired, that we are in a new source file. @@ -294,8 +294,8 @@ void Preprocessor::HandlePragmaDependency(Token &DependencyTok) { return; } - SourceLocation FileLoc = getCurrentFileLexer()->getFileLoc(); - const FileEntry *CurFile = SourceMgr.getFileEntryForLoc(FileLoc); + unsigned FileID = getCurrentFileLexer()->getFileID(); + const FileEntry *CurFile = SourceMgr.getFileEntryForID(FileID); // If this file is older than the file it depends on, emit a diagnostic. if (CurFile && CurFile->getModificationTime() < File->getModificationTime()) { |