diff options
| author | Chandler Carruth <chandlerc@gmail.com> | 2011-02-23 00:47:48 +0000 |
|---|---|---|
| committer | Chandler Carruth <chandlerc@gmail.com> | 2011-02-23 00:47:48 +0000 |
| commit | 1aef0c5621a6c129abbb856106363ce894382478 (patch) | |
| tree | 65722df677b218e6381180858158c853c9e347fd /clang/lib/Frontend/VerifyDiagnosticsClient.cpp | |
| parent | bb7dcf59a0b5eaadc55cb9757913ee06ea7893e5 (diff) | |
| download | bcm5719-llvm-1aef0c5621a6c129abbb856106363ce894382478.tar.gz bcm5719-llvm-1aef0c5621a6c129abbb856106363ce894382478.zip | |
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.
llvm-svn: 126281
Diffstat (limited to 'clang/lib/Frontend/VerifyDiagnosticsClient.cpp')
| -rw-r--r-- | clang/lib/Frontend/VerifyDiagnosticsClient.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Frontend/VerifyDiagnosticsClient.cpp b/clang/lib/Frontend/VerifyDiagnosticsClient.cpp index 51b351f4a92..fff417e20dc 100644 --- a/clang/lib/Frontend/VerifyDiagnosticsClient.cpp +++ b/clang/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; |

