aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2009-02-19 21:44:55 +0000
committerBill Wendling <isanbard@gmail.com>2009-02-19 21:44:55 +0000
commitb5ef27375731ece13a8ae0102b3f3233351036af (patch)
tree72dd465306d50e7bf840694435936ad0d9ab2a3d /lib/CodeGen/MachineInstr.cpp
parent490359d6879a903a9d496cda317c0d21ff1deacf (diff)
Print out debug info when printing the machine instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65067 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineInstr.cpp')
-rw-r--r--lib/CodeGen/MachineInstr.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp
index d4a60bc6ae..7bb616468c 100644
--- a/lib/CodeGen/MachineInstr.cpp
+++ b/lib/CodeGen/MachineInstr.cpp
@@ -874,6 +874,15 @@ void MachineInstr::print(raw_ostream &OS, const TargetMachine *TM) const {
}
}
+ if (!debugLoc.isUnknown()) {
+ const MachineFunction *MF = getParent()->getParent();
+ DebugLocTuple DLT = MF->getDebugLocTuple(debugLoc);
+ OS << " [dbg: "
+ << DLT.Src << ","
+ << DLT.Line << ","
+ << DLT.Col << "]";
+ }
+
OS << "\n";
}