mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Remove SourceManager::decompose() and switch its clients to normal location and
range printing Swift SVN r7122
This commit is contained in:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user