llvm.org GIT mirror llvm / f36a43d
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 Alp Toker 5 years ago
2 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
8282 if (BufferID == -1) BufferID = FindBufferContainingLoc(Loc);
8383 assert(BufferID != -1 && "Invalid Location!");
8484
85 MemoryBuffer *Buff = getBufferInfo(BufferID).Buffer;
85 const MemoryBuffer *Buff = getMemoryBuffer(BufferID);
8686
8787 // Count the number of \n's between the start of the file and the specified
8888 // location.
151151 int CurBuf = FindBufferContainingLoc(Loc);
152152 assert(CurBuf != -1 && "Invalid or unspecified location!");
153153
154 MemoryBuffer *CurMB = getBufferInfo(CurBuf).Buffer;
154 const MemoryBuffer *CurMB = getMemoryBuffer(CurBuf);
155155 BufferID = CurMB->getBufferIdentifier();
156156
157157 // Scan backward to find the start of the line.
3737 int operator<(const Tag &B) const { return *Id < *B.Id; }
3838 void emit(raw_ostream &OS) const {
3939 int BufferID = SrcMgr.FindBufferContainingLoc(Loc);
40 MemoryBuffer *CurMB = SrcMgr.getBufferInfo(BufferID).Buffer;
40 const MemoryBuffer *CurMB = SrcMgr.getMemoryBuffer(BufferID);
4141 const char *BufferName = CurMB->getBufferIdentifier();
4242 std::pair LineAndColumn = SrcMgr.getLineAndColumn(Loc);
4343 OS << *Id << "\t" << BufferName << "\t" << LineAndColumn.first << "\n";