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.
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.
int operator<(const Tag &B) const { return *Id < *B.Id; }
void emit(raw_ostream &OS) const {
int BufferID = SrcMgr.FindBufferContainingLoc(Loc);
- MemoryBuffer *CurMB = SrcMgr.getBufferInfo(BufferID).Buffer;
+ const MemoryBuffer *CurMB = SrcMgr.getMemoryBuffer(BufferID);
const char *BufferName = CurMB->getBufferIdentifier();
std::pair<unsigned, unsigned> LineAndColumn = SrcMgr.getLineAndColumn(Loc);
OS << *Id << "\t" << BufferName << "\t" << LineAndColumn.first << "\n";