diff options
author | Dale Johannesen <dalej@apple.com> | 2008-07-09 20:43:39 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2008-07-09 20:43:39 +0000 |
commit | b9aaddc1108ed2e54ee6eba1d678e2387a69bea0 (patch) | |
tree | 84842c794a10d9edb8df1b46921d430c1462be13 /llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | |
parent | a0bc522466980ffd45fa482302e7f753a4f1d81f (diff) | |
download | bcm5719-llvm-b9aaddc1108ed2e54ee6eba1d678e2387a69bea0.tar.gz bcm5719-llvm-b9aaddc1108ed2e54ee6eba1d678e2387a69bea0.zip |
Emit debug info for data-only files. This version
applies to ppc Darwin only.
llvm-svn: 53353
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp index 9c9dd391be7..98b4b4a560d 100644 --- a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp +++ b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp @@ -790,9 +790,6 @@ std::string DarwinAsmPrinter::getSectionForFunction(const Function &F) const { /// 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"; @@ -887,6 +884,15 @@ bool DarwinAsmPrinter::doInitialization(Module &M) { bool Result = AsmPrinter::doInitialization(M); + // Emit initial debug information. + DW.BeginModule(&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); @@ -903,8 +909,6 @@ bool DarwinAsmPrinter::doInitialization(Module &M) { } SwitchToTextSection(TAI->getTextSection()); - // Emit initial debug information. - DW.BeginModule(&M); return Result; } |