summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-01-16 22:59:51 +0000
committerChris Lattner <sabre@nondot.org>2009-01-16 22:59:51 +0000
commitfcc0a5a3f7d221a03be43d92dbaf4a3a5be8d7c2 (patch)
tree0774adb87e0a375d45387568bf92dbb060bff88e /clang/lib
parent41e9f6a854c1bfa259f890478abd375229232b5c (diff)
downloadbcm5719-llvm-fcc0a5a3f7d221a03be43d92dbaf4a3a5be8d7c2.tar.gz
bcm5719-llvm-fcc0a5a3f7d221a03be43d92dbaf4a3a5be8d7c2.zip
elimiante FullSourceLoc::getCanonicalFileID
llvm-svn: 62374
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Basic/SourceLocation.cpp9
-rw-r--r--clang/lib/Driver/HTMLDiagnostics.cpp10
2 files changed, 6 insertions, 13 deletions
diff --git a/clang/lib/Basic/SourceLocation.cpp b/clang/lib/Basic/SourceLocation.cpp
index 41ada637bd7..c68cb8ba925 100644
--- a/clang/lib/Basic/SourceLocation.cpp
+++ b/clang/lib/Basic/SourceLocation.cpp
@@ -98,9 +98,8 @@ bool FullSourceLoc::isInSystemHeader() const {
return SrcMgr->isInSystemHeader(Loc);
}
-
-const char * FullSourceLoc::getCharacterData() const {
- assert (isValid());
+const char *FullSourceLoc::getCharacterData() const {
+ assert(isValid());
return SrcMgr->getCharacterData(Loc);
}
@@ -109,10 +108,6 @@ const llvm::MemoryBuffer* FullSourceLoc::getBuffer() const {
return SrcMgr->getBuffer(Loc.getFileID());
}
-unsigned FullSourceLoc::getCanonicalFileID() const {
- return SrcMgr->getCanonicalFileID(Loc);
-}
-
void FullSourceLoc::dump() const {
if (!isValid()) {
fprintf(stderr, "Invalid Loc\n");
diff --git a/clang/lib/Driver/HTMLDiagnostics.cpp b/clang/lib/Driver/HTMLDiagnostics.cpp
index 41288167654..7f20e1ac44d 100644
--- a/clang/lib/Driver/HTMLDiagnostics.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud