aboutsummaryrefslogtreecommitdiffstats
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
commitb7596d2b13212e23f89e47a8fd508a6fffd186c1 (patch)
tree72dd465306d50e7bf840694435936ad0d9ab2a3d /lib/CodeGen/MachineInstr.cpp
parent4f68d2f17ded55c56dece65671425e974859effb (diff)
downloadexternal_llvm-b7596d2b13212e23f89e47a8fd508a6fffd186c1.zip
external_llvm-b7596d2b13212e23f89e47a8fd508a6fffd186c1.tar.gz
external_llvm-b7596d2b13212e23f89e47a8fd508a6fffd186c1.tar.bz2
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 d4a60bc..7bb6164 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";
}