diff options
author | Alp Toker <alp@nuanti.com> | 2014-06-25 00:41:15 +0000 |
---|---|---|
committer | Alp Toker <alp@nuanti.com> | 2014-06-25 00:41:15 +0000 |
commit | f36a43dbba69ea5c64f8623186782cb7e74e36f5 (patch) | |
tree | ace7c22b7d059f5fdd9f19d328c875f363e3f0ae /lib/Support | |
parent | 1a7e8c497358f3d51020fa5871505d41cecd6a36 (diff) | |
download | llvm-f36a43dbba69ea5c64f8623186782cb7e74e36f5.tar.gz llvm-f36a43dbba69ea5c64f8623186782cb7e74e36f5.tar.bz2 llvm-f36a43dbba69ea5c64f8623186782cb7e74e36f5.tar.xz |
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
Diffstat (limited to 'lib/Support')
-rw-r--r-- | lib/Support/SourceMgr.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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. |