aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86IntelAsmPrinter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/X86/X86IntelAsmPrinter.cpp')
-rwxr-xr-xlib/Target/X86/X86IntelAsmPrinter.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Target/X86/X86IntelAsmPrinter.cpp b/lib/Target/X86/X86IntelAsmPrinter.cpp
index ed673df9fe..5bc8b24372 100755
--- a/lib/Target/X86/X86IntelAsmPrinter.cpp
+++ b/lib/Target/X86/X86IntelAsmPrinter.cpp
@@ -26,9 +26,16 @@ using namespace x86;
/// method to print assembly for each instruction.
///
bool X86IntelAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
+ // Let PassManager know we need debug information and relay
+ // the MachineDebugInfo address on to DwarfWriter.
+ DW.SetDebugInfo(&getAnalysis<MachineDebugInfo>());
+
SetupMachineFunction(MF);
O << "\n\n";
+ // Emit pre-function debug information.
+ DW.BeginFunction(MF);
+
// Print out constants referenced by the function
EmitConstantPool(MF.getConstantPool());
@@ -56,6 +63,9 @@ bool X86IntelAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
}
}
+ // Emit post-function debug information.
+ DW.EndFunction(MF);
+
// We didn't modify anything.
return false;
}