summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-12-05 00:20:51 +0000
committerDan Gohman <gohman@apple.com>2009-12-05 00:20:51 +0000
commit33004b6302ad775044e89043ed81adbfe8cc4e89 (patch)
tree76a90533a6522509737ebbd88a2155b12533f2e8 /llvm/lib/CodeGen/MachineInstr.cpp
parent1b52d8c4ecc362a59d8dd9c0ee53bc9c2f3b009d (diff)
downloadbcm5719-llvm-33004b6302ad775044e89043ed81adbfe8cc4e89.tar.gz
bcm5719-llvm-33004b6302ad775044e89043ed81adbfe8cc4e89.zip
Don't print the debug directory; it's often long and uninteresting. Omit
the column number if it is not known. Handle the case of a missing filename better. llvm-svn: 90630
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index 2cafbd418f3..3f4a92804c4 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -1166,9 +1166,14 @@ void MachineInstr::print(raw_ostream &OS, const TargetMachine *TM) const {
DebugLocTuple DLT = MF->getDebugLocTuple(debugLoc);
DIScope Scope(DLT.Scope);
OS << " dbg:";
+ // Omit the directory, since it's usually long and uninteresting.
if (!Scope.isNull())
- OS << Scope.getDirectory() << ':' << Scope.getFilename() << ':';
- OS << DLT.Line << ":" << DLT.Col;
+ OS << Scope.getFilename();
+ else
+ OS << "<unknown>";
+ OS << ':' << DLT.Line;
+ if (DLT.Col != 0)
+ OS << ':' << DLT.Col;
}
OS << "\n";
OpenPOWER on IntegriCloud