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 | 94618eb8887e34ead9afb711186526e7b080535c (patch) | |
tree | c9356399911978a731f613f4a1b6dc1901faf8ff /lib | |
parent | 9094db17b41e9c59a47a8cacd1b44916b05219b1 (diff) | |
download | external_llvm-94618eb8887e34ead9afb711186526e7b080535c.zip external_llvm-94618eb8887e34ead9afb711186526e7b080535c.tar.gz external_llvm-94618eb8887e34ead9afb711186526e7b080535c.tar.bz2 |
Emit debug info for data-only files. This version
applies to ppc Darwin only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53353 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/PowerPC/PPCAsmPrinter.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp index 9c9dd39..98b4b4a 100644 --- a/lib/Target/PowerPC/PPCAsmPrinter.cpp +++ b/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; } |