diff options
author | Chris Lattner <sabre@nondot.org> | 2009-01-16 22:59:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-01-16 22:59:51 +0000 |
commit | 4abb87ef149b98b5762eadaaf10c1ccf35dc7c41 (patch) | |
tree | 592ae39964841356a865f5cc987ef0887c03b14c /lib/Driver/HTMLDiagnostics.cpp | |
parent | 0cf7bb937d5ed21118eeb45a93eb916723cc75a1 (diff) |
elimiante FullSourceLoc::getCanonicalFileID
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62374 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/HTMLDiagnostics.cpp')
-rw-r--r-- | lib/Driver/HTMLDiagnostics.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/Driver/HTMLDiagnostics.cpp b/lib/Driver/HTMLDiagnostics.cpp index 4128816765..7f20e1ac44 100644 --- a/lib/Driver/HTMLDiagnostics.cpp +++ b/lib/Driver/HTMLDiagnostics.cpp @@ -124,8 +124,7 @@ void HTMLDiagnostics::ReportDiag(const PathDiagnostic& D) { if (noDir) return; - SourceManager& SMgr = D.begin()->getLocation().getManager(); - + SourceManager &SMgr = D.begin()->getLocation().getManager(); unsigned FileID = 0; bool FileIDInitialized = false; @@ -134,10 +133,9 @@ void HTMLDiagnostics::ReportDiag(const PathDiagnostic& D) { FullSourceLoc L = I->getLocation().getInstantiationLoc(); if (!FileIDInitialized) { - FileID = L.getCanonicalFileID(); + FileID = SMgr.getCanonicalFileID(L.getLocation()); FileIDInitialized = true; - } - else if (L.getCanonicalFileID() != FileID) + } else if (SMgr.getCanonicalFileID(L.getLocation()) != FileID) return; // FIXME: Emit a warning? // Check the source ranges. @@ -345,7 +343,7 @@ void HTMLDiagnostics::HandlePiece(Rewriter& R, unsigned BugFileID, assert (&LPos.getManager() == &SM && "SourceManagers are different!"); - if (LPos.getCanonicalFileID() != BugFileID) + if (SM.getCanonicalFileID(LPos.getLocation()) != BugFileID) return; const llvm::MemoryBuffer *Buf = SM.getBuffer(FileID); |