some minor cleanups to SourceManager, and eliminate the
SourceManager::getBuffer(SourceLocation) method.
llvm-svn: 62494
diff --git a/clang/lib/Basic/SourceLocation.cpp b/clang/lib/Basic/SourceLocation.cpp
index dcfd547..1f5804ff 100644
--- a/clang/lib/Basic/SourceLocation.cpp
+++ b/clang/lib/Basic/SourceLocation.cpp
@@ -111,7 +111,7 @@
const llvm::MemoryBuffer* FullSourceLoc::getBuffer() const {
assert(isValid());
- return SrcMgr->getBuffer(*this);
+ return SrcMgr->getBuffer(SrcMgr->getCanonicalFileID(*this));
}
void FullSourceLoc::dump() const {