Back out 53254. It broke ppc debug info codegen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53280 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng
2008-07-09 06:36:53 +00:00
parent 3e30cbb457
commit 526be70f94
3 changed files with 15 additions and 23 deletions

View File

@@ -42,13 +42,11 @@ STATISTIC(EmittedInsts, "Number of machine instrs printed");
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 @@ FunctionPass *llvm::createARMCodePrinterPass(std::ostream &o,
bool ARMAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
AFI = MF.getInfo<ARMFunctionInfo>();
DW.SetModuleInfo(&getAnalysis<MachineModuleInfo>());
SetupMachineFunction(MF);
O << "\n";
@@ -800,11 +800,6 @@ bool ARMAsmPrinter::doInitialization(Module &M) {
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);