aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic/SourceManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Basic/SourceManager.cpp')
-rw-r--r--lib/Basic/SourceManager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Basic/SourceManager.cpp b/lib/Basic/SourceManager.cpp
index f793c978cc..b053b160e1 100644
--- a/lib/Basic/SourceManager.cpp
+++ b/lib/Basic/SourceManager.cpp
@@ -184,7 +184,7 @@ SourceLocation SourceManager::getInstantiationLoc(SourceLocation SpellingLoc,
/// data for the specified location.
std::pair<const char*, const char*>
SourceManager::getBufferData(SourceLocation Loc) const {
- const llvm::MemoryBuffer *Buf = getBuffer(Loc);
+ const llvm::MemoryBuffer *Buf = getBuffer(getCanonicalFileID(Loc));
return std::make_pair(Buf->getBufferStart(), Buf->getBufferEnd());
}