[llvm-commits] [llvm] r90630 - /llvm/trunk/lib/CodeGen/MachineInstr.cpp
Dan Gohman
gohman at apple.com
Fri Dec 4 16:20:51 PST 2009
Author: djg
Date: Fri Dec 4 18:20:51 2009
New Revision: 90630
URL: http://llvm.org/viewvc/llvm-project?rev=90630&view=rev
Log:
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.
Modified:
llvm/trunk/lib/CodeGen/MachineInstr.cpp
Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=90630&r1=90629&r2=90630&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Fri Dec 4 18:20:51 2009
@@ -1166,9 +1166,14 @@
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";
More information about the llvm-commits
mailing list