From 0ca3c62078a9bbeb9ed53871876caf5560bf6ff7 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Tue, 16 Mar 2010 14:48:07 +0000 Subject: Switch another function to StringRef instead of char pointer pairs. llvm-svn: 98631 --- clang/lib/Basic/SourceLocation.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'clang/lib/Basic/SourceLocation.cpp') 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 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 FullSourceLoc::getDecomposedLoc() const { -- cgit v1.2.3