From f36a43dbba69ea5c64f8623186782cb7e74e36f5 Mon Sep 17 00:00:00 2001 From: Alp Toker Date: Wed, 25 Jun 2014 00:41:15 +0000 Subject: Use SourceMgr::getMemoryBuffer() in a couple of places Cleanup only. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211656 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/SourceMgr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Support') diff --git a/lib/Support/SourceMgr.cpp b/lib/Support/SourceMgr.cpp index 4d00d3baa4..2401ce7377 100644 --- a/lib/Support/SourceMgr.cpp +++ b/lib/Support/SourceMgr.cpp @@ -83,7 +83,7 @@ SourceMgr::getLineAndColumn(SMLoc Loc, int BufferID) const { if (BufferID == -1) BufferID = FindBufferContainingLoc(Loc); assert(BufferID != -1 && "Invalid Location!"); - MemoryBuffer *Buff = getBufferInfo(BufferID).Buffer; + const MemoryBuffer *Buff = getMemoryBuffer(BufferID); // Count the number of \n's between the start of the file and the specified // location. @@ -152,7 +152,7 @@ SMDiagnostic SourceMgr::GetMessage(SMLoc Loc, SourceMgr::DiagKind Kind, int CurBuf = FindBufferContainingLoc(Loc); assert(CurBuf != -1 && "Invalid or unspecified location!"); - MemoryBuffer *CurMB = getBufferInfo(CurBuf).Buffer; + const MemoryBuffer *CurMB = getMemoryBuffer(CurBuf); BufferID = CurMB->getBufferIdentifier(); // Scan backward to find the start of the line. -- cgit v1.2.3