summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86ATTAsmPrinter.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2008-07-08 21:56:22 +0000
committerDale Johannesen <dalej@apple.com>2008-07-08 21:56:22 +0000
commitb9097a71d41d61331f545b7fec163ff0b8f8e45c (patch)
treec8b9e536f17108ff6a5ed6e8017bcd3c16c34348 /llvm/lib/Target/X86/X86ATTAsmPrinter.cpp
parent45a4ec1a270c596268ad801b4d7e093425ae548a (diff)
downloadbcm5719-llvm-b9097a71d41d61331f545b7fec163ff0b8f8e45c.tar.gz
bcm5719-llvm-b9097a71d41d61331f545b7fec163ff0b8f8e45c.zip
Make debug info come out in data-only files.
This is a question of the debugging setup code not being called at the right time, and it's called from target-dependent code for some reason. I have only attempted to fix Darwin, but I'm pretty sure it's broken elsewhere; I'll leave that to people who can test it. llvm-svn: 53254
Diffstat (limited to 'llvm/lib/Target/X86/X86ATTAsmPrinter.cpp')
-rw-r--r--llvm/lib/Target/X86/X86ATTAsmPrinter.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/llvm/lib/Target/X86/X86ATTAsmPrinter.cpp b/llvm/lib/Target/X86/X86ATTAsmPrinter.cpp
index a61bb2261d6..4e1c1dfde1d 100644
--- a/llvm/lib/Target/X86/X86ATTAsmPrinter.cpp
+++ b/llvm/lib/Target/X86/X86ATTAsmPrinter.cpp
@@ -232,13 +232,6 @@ bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
const Function *F = MF.getFunction();
unsigned CC = F->getCallingConv();
- if (TAI->doesSupportDebugInformation()) {
- // Let PassManager know we need debug information and relay
- // the MachineModuleInfo address on to DwarfWriter.
- MMI = &getAnalysis<MachineModuleInfo>();
- DW.SetModuleInfo(MMI);
- }
-
SetupMachineFunction(MF);
O << "\n\n";
@@ -751,13 +744,20 @@ void X86ATTAsmPrinter::printMachineInstruction(const MachineInstr *MI) {
/// doInitialization
bool X86ATTAsmPrinter::doInitialization(Module &M) {
+
+ bool Result = AsmPrinter::doInitialization(M);
+
if (TAI->doesSupportDebugInformation()) {
// Emit initial debug information.
DW.BeginModule(&M);
+ // Let PassManager know we need debug information and relay
+ // the MachineModuleInfo address on to DwarfWriter.
+ // AsmPrinter::doInitialization should have done this analysis.
+ MMI = getAnalysisToUpdate<MachineModuleInfo>();
+ assert(MMI);
+ DW.SetModuleInfo(MMI);
}
- bool Result = AsmPrinter::doInitialization(M);
-
// Darwin wants symbols to be quoted if they have complex names.
if (Subtarget->isTargetDarwin())
Mang->setUseQuotes(true);
OpenPOWER on IntegriCloud