diff options
author | Dale Johannesen <dalej@apple.com> | 2008-07-09 21:24:07 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2008-07-09 21:24:07 +0000 |
commit | dbd04c0783916a9396cd6b3f6a1b1a21cb7f9660 (patch) | |
tree | d9c27c13eab08e97420aa2be0885f3c8d0cae39a /llvm/lib/Target | |
parent | 89e71d48b8433fcb7657dedfe3b072a9148aa8af (diff) | |
download | bcm5719-llvm-dbd04c0783916a9396cd6b3f6a1b1a21cb7f9660.tar.gz bcm5719-llvm-dbd04c0783916a9396cd6b3f6a1b1a21cb7f9660.zip |
Emit debug into for data-only files for Linux PPC.
I cannot test this target, let me know if it breaks!
llvm-svn: 53362
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp index 98b4b4a560d..b7b2a951495 100644 --- a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp +++ b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp @@ -293,10 +293,11 @@ namespace { struct VISIBILITY_HIDDEN LinuxAsmPrinter : public PPCAsmPrinter { DwarfWriter DW; + MachineModuleInfo *MMI; LinuxAsmPrinter(std::ostream &O, PPCTargetMachine &TM, const TargetAsmInfo *T) - : PPCAsmPrinter(O, TM, T), DW(O, this, T) { + : PPCAsmPrinter(O, TM, T), DW(O, this, T), MMI(0) { } virtual const char *getPassName() const { @@ -631,13 +632,19 @@ bool LinuxAsmPrinter::runOnMachineFunction(MachineFunction &MF) { bool LinuxAsmPrinter::doInitialization(Module &M) { bool Result = AsmPrinter::doInitialization(M); + // Emit initial debug information. + DW.BeginModule(&M); + + // AsmPrinter::doInitialization should have done this analysis. + MMI = getAnalysisToUpdate<MachineModuleInfo>(); + assert(MMI); + DW.SetModuleInfo(MMI); + // GNU as handles section names wrapped in quotes Mang->setUseQuotes(true); SwitchToTextSection(TAI->getTextSection()); - // Emit initial debug information. - DW.BeginModule(&M); return Result; } |