From b5ef27375731ece13a8ae0102b3f3233351036af Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Thu, 19 Feb 2009 21:44:55 +0000 Subject: [PATCH] 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 --- lib/CodeGen/MachineInstr.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index d4a60bc6ae8..7bb616468c1 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"; } -- 2.34.1