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 | 7899d5049b0e96f18c27b18793c1891672ba080c (patch) | |
tree | 2f261fb54807167954d756d96557528bfc7cc89b /llvm/lib/Support/SourceMgr.cpp | |
parent | 2bc7643d10e29f3133fc34ea256a3467e1716194 (diff) | |
download | bcm5719-llvm-7899d5049b0e96f18c27b18793c1891672ba080c.tar.gz bcm5719-llvm-7899d5049b0e96f18c27b18793c1891672ba080c.zip |
Use SourceMgr::getMemoryBuffer() in a couple of places
Cleanup only.
llvm-svn: 211656
Diffstat (limited to 'llvm/lib/Support/SourceMgr.cpp')
-rw-r--r-- | llvm/lib/Support/SourceMgr.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/SourceMgr.cpp b/llvm/lib/Support/SourceMgr.cpp index 4d00d3baa41..2401ce73772 100644 --- a/llvm/lib/Support/SourceMgr.cpp +++ b/llvm/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. |