Remove SourceManager::decompose() and switch its clients to normal location and

range printing


Swift SVN r7122
This commit is contained in:
Dmitri Hrybenko
2013-08-10 02:19:50 +00:00
parent efd688dcd9
commit 3d37954e81
5 changed files with 7 additions and 77 deletions

View File

@@ -36,21 +36,6 @@ unsigned SourceManager::getLocOffsetInBuffer(SourceLoc Loc,
return Loc.Value.getPointer() - Buffer->getBuffer().begin();
}
DecomposedLoc SourceManager::decompose(SourceLoc Loc) const {
assert(Loc.isValid());
unsigned BufferID =
unsigned(LLVMSourceMgr.FindBufferContainingLoc(Loc.Value));
assert(BufferID != ~0U);
DecomposedLoc Result;
Result.Buffer = LLVMSourceMgr.getMemoryBuffer(BufferID);
std::tie(Result.Line, Result.Column) =
LLVMSourceMgr.getLineAndColumn(Loc.Value, BufferID);
return Result;
}
void SourceLoc::printLineAndColumn(raw_ostream &OS,
const SourceManager &SM) const {
if (isInvalid()) {