aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic/SourceLocation.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2010-03-16 14:48:07 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2010-03-16 14:48:07 +0000
commitceafc4b63599d14f0b5b10ff92e22bf242682dce (patch)
tree17cd8fb73b76df9b2683aaaebf961d40693ce094 /lib/Basic/SourceLocation.cpp
parentf6ac97b101c8840efa92bf29166077ce4049e293 (diff)
Switch another function to StringRef instead of char pointer pairs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98631 91177308-0d34-0410-b5e6-96231b3b80d8
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 578a4eb34b..126d640364 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 {