diff options
author | Dale Johannesen <dalej@apple.com> | 2008-07-09 21:25:06 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2008-07-09 21:25:06 +0000 |
commit | d03772466a2603861ebc2db1564eb6c8571435f9 (patch) | |
tree | 9d45d372379c7712051bdffd6f1f6cf3fd09f7b5 /lib/Target/CellSPU | |
parent | 757809a1709dc939ae875f08419de158df04913d (diff) | |
download | external_llvm-d03772466a2603861ebc2db1564eb6c8571435f9.zip external_llvm-d03772466a2603861ebc2db1564eb6c8571435f9.tar.gz external_llvm-d03772466a2603861ebc2db1564eb6c8571435f9.tar.bz2 |
Emit debug info for data-only files on Cell SPU.
I cannot test this target, let me know if it breaks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53363 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/CellSPU')
-rw-r--r-- | lib/Target/CellSPU/SPUAsmPrinter.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Target/CellSPU/SPUAsmPrinter.cpp b/lib/Target/CellSPU/SPUAsmPrinter.cpp index 4e4324b..817b746 100644 --- a/lib/Target/CellSPU/SPUAsmPrinter.cpp +++ b/lib/Target/CellSPU/SPUAsmPrinter.cpp @@ -273,11 +273,13 @@ namespace { struct VISIBILITY_HIDDEN LinuxAsmPrinter : public SPUAsmPrinter { DwarfWriter DW; + MachineModuleInfo *MMI; LinuxAsmPrinter(std::ostream &O, SPUTargetMachine &TM, const TargetAsmInfo *T) : SPUAsmPrinter(O, TM, T), - DW(O, this, T) + DW(O, this, T), + MMI(0) { } virtual const char *getPassName() const { @@ -422,8 +424,6 @@ std::string LinuxAsmPrinter::getSectionForFunction(const Function &F) const { bool LinuxAsmPrinter::runOnMachineFunction(MachineFunction &MF) { - DW.SetModuleInfo(&getAnalysis<MachineModuleInfo>()); - SetupMachineFunction(MF); O << "\n\n"; @@ -488,6 +488,8 @@ bool LinuxAsmPrinter::doInitialization(Module &M) { SwitchToTextSection(TAI->getTextSection()); // Emit initial debug information. DW.BeginModule(&M); + MMI = getAnalysisToUpdate<MachineModuleInfo>(); + DW.SetModuleInfo(MMI); return Result; } |