summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-11-23 21:29:08 +0000
committerDan Gohman <gohman@apple.com>2009-11-23 21:29:08 +0000
commit2e3f187cbd542ec5f8f01efc40ff80bfa3ce7602 (patch)
tree3676d84ccd522cad24ac0d5a517a6604940142da /llvm/lib/CodeGen/MachineInstr.cpp
parentdbb4140f37ae494e1a6cfbe9d82bd9b31c41bc25 (diff)
downloadbcm5719-llvm-2e3f187cbd542ec5f8f01efc40ff80bfa3ce7602.tar.gz
bcm5719-llvm-2e3f187cbd542ec5f8f01efc40ff80bfa3ce7602.zip
Print the debug info line and column in MachineInstr::print even when there's
no filename. This situation is apparently fairly common right now. llvm-svn: 89701
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index b250faa62ae..f11026fde7a 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -1149,9 +1149,10 @@ void MachineInstr::print(raw_ostream &OS, const TargetMachine *TM) const {
DebugLocTuple DLT = MF->getDebugLocTuple(debugLoc);
DICompileUnit CU(DLT.Scope);
+ OS << " dbg:";
if (!CU.isNull())
- OS << " dbg:" << CU.getDirectory() << '/' << CU.getFilename() << ":"
- << DLT.Line << ":" << DLT.Col;
+ OS << CU.getDirectory() << '/' << CU.getFilename() << ":";
+ OS << DLT.Line << ":" << DLT.Col;
}
OS << "\n";
OpenPOWER on IntegriCloud