summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2008-07-08 21:56:22 +0000
committerDale Johannesen <dalej@apple.com>2008-07-08 21:56:22 +0000
commitb9097a71d41d61331f545b7fec163ff0b8f8e45c (patch)
treec8b9e536f17108ff6a5ed6e8017bcd3c16c34348 /llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
parent45a4ec1a270c596268ad801b4d7e093425ae548a (diff)
downloadbcm5719-llvm-b9097a71d41d61331f545b7fec163ff0b8f8e45c.tar.gz
bcm5719-llvm-b9097a71d41d61331f545b7fec163ff0b8f8e45c.zip
Make debug info come out in data-only files.
This is a question of the debugging setup code not being called at the right time, and it's called from target-dependent code for some reason. I have only attempted to fix Darwin, but I'm pretty sure it's broken elsewhere; I'll leave that to people who can test it. llvm-svn: 53254
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
index 9c9dd391be7..ae967a8d00f 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,12 @@ bool DarwinAsmPrinter::doInitialization(Module &M) {
bool Result = AsmPrinter::doInitialization(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);
OpenPOWER on IntegriCloud