Changes in directory llvm/lib/Target/PowerPC:
PPCAsmPrinter.cpp updated: 1.134 -> 1.135 --- Log message: Applied some recommend changes from sabre. The dominate one beginning "let the pass manager do it's thing." Fixes crash when compiling -g files and suppresses dwarf statements if no debug info is present. --- Diffs of the changes: (+11 -7) PPCAsmPrinter.cpp | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 deletions(-) Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.134 llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.135 --- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.134 Wed Jan 4 07:52:30 2006 +++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Wed Jan 4 16:28:25 2006 @@ -204,16 +204,16 @@ virtual bool runOnMachineFunction(MachineFunction &F) = 0; virtual bool doFinalization(Module &M) = 0; + }; /// DarwinDwarfWriter - Dwarf debug info writer customized for Darwin/Mac OS X /// struct DarwinDwarfWriter : public DwarfWriter { // Ctor. - DarwinDwarfWriter(std::ostream &o, AsmPrinter *ap, MachineDebugInfo &di) - : DwarfWriter(o, ap, di) + DarwinDwarfWriter(std::ostream &o, AsmPrinter *ap) + : DwarfWriter(o, ap) { - hasLEB128 = false; needsSet = true; DwarfAbbrevSection = ".section __DWARFA,__debug_abbrev,regular,debug"; DwarfInfoSection = ".section __DWARFA,__debug_info,regular,debug"; @@ -229,9 +229,7 @@ DarwinDwarfWriter DW; DarwinAsmPrinter(std::ostream &O, TargetMachine &TM) - : PPCAsmPrinter(O, TM), - // FIXME - MachineDebugInfo needs a proper location - DW(O, this, getMachineDebugInfo()) + : PPCAsmPrinter(O, TM), DW(O, this) { CommentString = ";"; GlobalPrefix = "_"; @@ -252,6 +250,11 @@ bool runOnMachineFunction(MachineFunction &F); bool doInitialization(Module &M); bool doFinalization(Module &M); + + void getAnalysisUsage(AnalysisUsage &AU) const { + AU.addRequired<MachineDebugInfo>(); + } + }; /// AIXAsmPrinter - PowerPC assembly printer, customized for AIX @@ -483,6 +486,7 @@ Mang->setUseQuotes(true); // Emit initial debug information. + DW.SetDebugInfo(getAnalysisToUpdate<MachineDebugInfo>()); DW.BeginModule(); return false; } @@ -613,7 +617,7 @@ return false; // success } -/// runOnMachineFunction - This uses the printMachineInstruction() +/// runOnMachineFunction - This uses the e() /// method to print assembly for each instruction. /// bool AIXAsmPrinter::runOnMachineFunction(MachineFunction &MF) { _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits