[llvm-commits] [llvm] r53280 - in /llvm/trunk/lib/Target: ARM/ARMAsmPrinter.cpp PowerPC/PPCAsmPrinter.cpp X86/X86ATTAsmPrinter.cpp
Evan Cheng
evan.cheng at apple.com
Tue Jul 8 23:36:53 PDT 2008
Author: evancheng
Date: Wed Jul 9 01:36:53 2008
New Revision: 53280
URL: http://llvm.org/viewvc/llvm-project?rev=53280&view=rev
Log:
Back out 53254. It broke ppc debug info codegen.
Modified:
llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp
llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp
llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp?rev=53280&r1=53279&r2=53280&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp Wed Jul 9 01:36:53 2008
@@ -42,13 +42,11 @@
namespace {
struct VISIBILITY_HIDDEN ARMAsmPrinter : public AsmPrinter {
ARMAsmPrinter(std::ostream &O, TargetMachine &TM, const TargetAsmInfo *T)
- : AsmPrinter(O, TM, T), DW(O, this, T), MMI(0), AFI(NULL),
- InCPMode(false) {
+ : AsmPrinter(O, TM, T), DW(O, this, T), AFI(NULL), InCPMode(false) {
Subtarget = &TM.getSubtarget<ARMSubtarget>();
}
DwarfWriter DW;
- MachineModuleInfo *MMI;
/// Subtarget - Keep a pointer to the ARMSubtarget around so that we can
/// make the right decision when printing asm code for different targets.
@@ -178,6 +176,8 @@
bool ARMAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
AFI = MF.getInfo<ARMFunctionInfo>();
+ DW.SetModuleInfo(&getAnalysis<MachineModuleInfo>());
+
SetupMachineFunction(MF);
O << "\n";
@@ -800,11 +800,6 @@
bool Result = AsmPrinter::doInitialization(M);
- // 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.
if (Subtarget->isTargetDarwin())
Mang->setUseQuotes(true);
Modified: llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp?rev=53280&r1=53279&r2=53280&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp Wed Jul 9 01:36:53 2008
@@ -790,6 +790,9 @@
/// 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";
@@ -884,12 +887,6 @@
bool Result = AsmPrinter::doInitialization(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);
Modified: llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp?rev=53280&r1=53279&r2=53280&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp Wed Jul 9 01:36:53 2008
@@ -232,6 +232,13 @@
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";
@@ -744,20 +751,13 @@
/// 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);
More information about the llvm-commits
mailing list