aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/CodeGen/MachineInstr.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp
index 2cafbd4..3f4a928 100644
--- a/lib/CodeGen/MachineInstr.cpp
+++ b/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";