aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/VerifyDiagnosticsClient.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-02-23 00:47:48 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-02-23 00:47:48 +0000
commit5ef04ee40c3332d31b6d1439f50d0ddb45812929 (patch)
treed282d4e96ab8c6122bbcd74db78ec9b2cc3934f5 /lib/Frontend/VerifyDiagnosticsClient.cpp
parentfd405efea156302c4b9d8e26e9cd3eddef5bf9b0 (diff)
Switch the VerifyDiagnosticsClient to use PresumedLocs now that they
exist. Cheat and do this by adding some wrappers around the PresumedLoc machinery that directly return the line and column number. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126281 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/VerifyDiagnosticsClient.cpp')
-rw-r--r--lib/Frontend/VerifyDiagnosticsClient.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Frontend/VerifyDiagnosticsClient.cpp b/lib/Frontend/VerifyDiagnosticsClient.cpp
index 51b351f4a9..fff417e20d 100644
--- a/lib/Frontend/VerifyDiagnosticsClient.cpp
+++ b/lib/Frontend/VerifyDiagnosticsClient.cpp
@@ -369,7 +369,7 @@ static unsigned PrintProblem(Diagnostic &Diags, SourceManager *SourceMgr,
if (I->first.isInvalid() || !SourceMgr)
OS << "\n (frontend)";
else
- OS << "\n Line " << SourceMgr->getInstantiationLineNumber(I->first);
+ OS << "\n Line " << SourceMgr->getPresumedLineNumber(I->first);
OS << ": " << I->second;
}
@@ -391,7 +391,7 @@ static unsigned PrintProblem(Diagnostic &Diags, SourceManager *SourceMgr,
if (D.Location.isInvalid() || !SourceMgr)
OS << "\n (frontend)";
else
- OS << "\n Line " << SourceMgr->getInstantiationLineNumber(D.Location);
+ OS << "\n Line " << SourceMgr->getPresumedLineNumber(D.Location);
OS << ": " << D.Text;
}
@@ -413,12 +413,12 @@ static unsigned CheckLists(Diagnostic &Diags, SourceManager &SourceMgr,
for (DirectiveList::iterator I = Left.begin(), E = Left.end(); I != E; ++I) {
Directive& D = **I;
- unsigned LineNo1 = SourceMgr.getInstantiationLineNumber(D.Location);
+ unsigned LineNo1 = SourceMgr.getPresumedLineNumber(D.Location);
for (unsigned i = 0; i < D.Count; ++i) {
DiagList::iterator II, IE;
for (II = Right.begin(), IE = Right.end(); II != IE; ++II) {
- unsigned LineNo2 = SourceMgr.getInstantiationLineNumber(II->first);
+ unsigned LineNo2 = SourceMgr.getPresumedLineNumber(II->first);
if (LineNo1 != LineNo2)
continue;