summaryrefslogtreecommitdiffstats
path: root/clang/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
commit0ca3c62078a9bbeb9ed53871876caf5560bf6ff7 (patch)
treedddbea4ffb3f6d995b691b497020f10e1b95a548 /clang/lib/Basic/SourceLocation.cpp
parenteb92dc0b09262ed29149bf4faaa74a38df738cec (diff)
downloadbcm5719-llvm-0ca3c62078a9bbeb9ed53871876caf5560bf6ff7.tar.gz
bcm5719-llvm-0ca3c62078a9bbeb9ed53871876caf5560bf6ff7.zip
Switch another function to StringRef instead of char pointer pairs.
llvm-svn: 98631
Diffstat (limited to 'clang/lib/Basic/SourceLocation.cpp')
-rw-r--r--clang/lib/Basic/SourceLocation.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Basic/SourceLocation.cpp b/clang/lib/Basic/SourceLocation.cpp
index 578a4eb34ba..126d640364d 100644
--- a/clang/lib/Basic/SourceLocation.cpp
+++ b/clang/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 {
OpenPOWER on IntegriCloud