diff options
author | Dan Gohman <gohman@apple.com> | 2009-12-05 00:20:51 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-12-05 00:20:51 +0000 |
commit | 4b808b014b0cd25261f93e1885ffdbd0247d8634 (patch) | |
tree | ae3bd53914c2d0cf7e197c07add28ff6713051fe /lib | |
parent | 7004b9cf337c0ebdb778c157529def6ad425ba5b (diff) | |
download | external_llvm-4b808b014b0cd25261f93e1885ffdbd0247d8634.zip external_llvm-4b808b014b0cd25261f93e1885ffdbd0247d8634.tar.gz external_llvm-4b808b014b0cd25261f93e1885ffdbd0247d8634.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90630 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/MachineInstr.cpp | 9 |
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"; |