summaryrefslogtreecommitdiff
path: root/lib/Basic/SourceLocation.cpp
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2010-03-16 16:52:15 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2010-03-16 16:52:15 +0000
commit4a37f65f1c1373c9956d118a012943de2f61edb0 (patch)
tree52aebaff3a47b97dbac434530524c30967468412 /lib/Basic/SourceLocation.cpp
parenta16e9ac1f192503038f49e0c52edd7dcb2ce023a (diff)
Notes
Diffstat (limited to 'lib/Basic/SourceLocation.cpp')
-rw-r--r--lib/Basic/SourceLocation.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Basic/SourceLocation.cpp b/lib/Basic/SourceLocation.cpp
index 578a4eb34bab..126d640364d0 100644
--- a/lib/Basic/SourceLocation.cpp
+++ b/lib/Basic/SourceLocation.cpp
@@ -115,9 +115,8 @@ const llvm::MemoryBuffer* FullSourceLoc::getBuffer() const {
return SrcMgr->getBuffer(SrcMgr->getFileID(*this));
}
-std::pair<const char*, const char*> FullSourceLoc::getBufferData() const {
- const llvm::MemoryBuffer *Buf = getBuffer();
- return std::make_pair(Buf->getBufferStart(), Buf->getBufferEnd());
+llvm::StringRef FullSourceLoc::getBufferData() const {
+ return getBuffer()->getBuffer();
}
std::pair<FileID, unsigned> FullSourceLoc::getDecomposedLoc() const {