[llvm-commits] [llvm] r53420 - in /llvm/branches/Apple/Gaz/lib/Target: PowerPC/PPCAsmPrinter.cpp X86/X86ATTAsmPrinter.cpp
Bill Wendling
isanbard at gmail.com
Thu Jul 10 13:52:09 PDT 2008
Author: void
Date: Thu Jul 10 15:52:08 2008
New Revision: 53420
URL: http://llvm.org/viewvc/llvm-project?rev=53420&view=rev
Log:
Pull r53353 and r53355 into Gaz:
Emit debug info for data-only files. This version
applies to ppc Darwin only.
Emit debug info for data-only files. This version
is X86 ATT only.
Modified:
llvm/branches/Apple/Gaz/lib/Target/PowerPC/PPCAsmPrinter.cpp
llvm/branches/Apple/Gaz/lib/Target/X86/X86ATTAsmPrinter.cpp
Modified: llvm/branches/Apple/Gaz/lib/Target/PowerPC/PPCAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Gaz/lib/Target/PowerPC/PPCAsmPrinter.cpp?rev=53420&r1=53419&r2=53420&view=diff
==============================================================================
--- llvm/branches/Apple/Gaz/lib/Target/PowerPC/PPCAsmPrinter.cpp (original)
+++ llvm/branches/Apple/Gaz/lib/Target/PowerPC/PPCAsmPrinter.cpp Thu Jul 10 15:52:08 2008
@@ -790,9 +790,6 @@
/// method to print assembly for each instruction.
///
bool DarwinAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
- // We need this for Personality functions.
- MMI = &getAnalysis<MachineModuleInfo>();
- DW.SetModuleInfo(MMI);
SetupMachineFunction(MF);
O << "\n\n";
@@ -887,6 +884,15 @@
bool Result = AsmPrinter::doInitialization(M);
+ // Emit initial debug information.
+ DW.BeginModule(&M);
+
+ // We need this for Personality functions.
+ // AsmPrinter::doInitialization should have done this analysis.
+ MMI = getAnalysisToUpdate<MachineModuleInfo>();
+ assert(MMI);
+ DW.SetModuleInfo(MMI);
+
// Darwin wants symbols to be quoted if they have complex names.
Mang->setUseQuotes(true);
@@ -903,8 +909,6 @@
}
SwitchToTextSection(TAI->getTextSection());
- // Emit initial debug information.
- DW.BeginModule(&M);
return Result;
}
Modified: llvm/branches/Apple/Gaz/lib/Target/X86/X86ATTAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Gaz/lib/Target/X86/X86ATTAsmPrinter.cpp?rev=53420&r1=53419&r2=53420&view=diff
==============================================================================
--- llvm/branches/Apple/Gaz/lib/Target/X86/X86ATTAsmPrinter.cpp (original)
+++ llvm/branches/Apple/Gaz/lib/Target/X86/X86ATTAsmPrinter.cpp Thu Jul 10 15:52:08 2008
@@ -232,13 +232,6 @@
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";
@@ -758,6 +751,14 @@
bool Result = AsmPrinter::doInitialization(M);
+ if (TAI->doesSupportDebugInformation()) {
+ // Let PassManager know we need debug information and relay
+ // the MachineModuleInfo address on to DwarfWriter.
+ // AsmPrinter::doInitialization did this analysis.
+ MMI = getAnalysisToUpdate<MachineModuleInfo>();
+ DW.SetModuleInfo(MMI);
+ }
+
// Darwin wants symbols to be quoted if they have complex names.
if (Subtarget->isTargetDarwin())
Mang->setUseQuotes(true);
More information about the llvm-commits
mailing list