aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/HTMLDiagnostics.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-01-16 23:06:35 +0000
committerChris Lattner <sabre@nondot.org>2009-01-16 23:06:35 +0000
commit59ddeabc4c0aa2fdeef5a9183e8af69db07b5e74 (patch)
treeca41270c8cfe57821a54eafe6ef409c57229a961 /lib/Driver/HTMLDiagnostics.cpp
parenta50bd54164393ca3cd08016e7099bdeb531b5014 (diff)
eliminate FullSourceLoc::getLocation() now that FullSourceLoc
*is* the location. This eliminates some weird X.getLocation().getLocation()'s. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62376 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/HTMLDiagnostics.cpp')
-rw-r--r--lib/Driver/HTMLDiagnostics.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/Driver/HTMLDiagnostics.cpp b/lib/Driver/HTMLDiagnostics.cpp
index 7f20e1ac44..f335396ec4 100644
--- a/lib/Driver/HTMLDiagnostics.cpp
+++ b/lib/Driver/HTMLDiagnostics.cpp
@@ -133,9 +133,9 @@ void HTMLDiagnostics::ReportDiag(const PathDiagnostic& D) {
FullSourceLoc L = I->getLocation().getInstantiationLoc();
if (!FileIDInitialized) {
- FileID = SMgr.getCanonicalFileID(L.getLocation());
+ FileID = SMgr.getCanonicalFileID(L);
FileIDInitialized = true;
- } else if (SMgr.getCanonicalFileID(L.getLocation()) != FileID)
+ } else if (SMgr.getCanonicalFileID(L) != FileID)
return; // FIXME: Emit a warning?
// Check the source ranges.
@@ -339,11 +339,11 @@ void HTMLDiagnostics::HandlePiece(Rewriter& R, unsigned BugFileID,
SourceManager& SM = R.getSourceMgr();
FullSourceLoc LPos = Pos.getInstantiationLoc();
- unsigned FileID = SM.getCanonicalFileID(LPos.getLocation());
+ unsigned FileID = SM.getCanonicalFileID(LPos);
assert (&LPos.getManager() == &SM && "SourceManagers are different!");
- if (SM.getCanonicalFileID(LPos.getLocation()) != BugFileID)
+ if (SM.getCanonicalFileID(LPos) != BugFileID)
return;
const llvm::MemoryBuffer *Buf = SM.getBuffer(FileID);
@@ -351,7 +351,6 @@ void HTMLDiagnostics::HandlePiece(Rewriter& R, unsigned BugFileID,
// Compute the column number. Rewind from the current position to the start
// of the line.
-
unsigned ColNo = LPos.getColumnNumber();
const char *TokInstantiationPtr = LPos.getCharacterData();
const char *LineStart = TokInstantiationPtr-ColNo;