aboutsummaryrefslogtreecommitdiff
path: root/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
commitf71cb9b3ed1d7b3e438e9990ce1587ba275e70bf (patch)
tree54e43c408df9849657f4d2a222f7d66e20e114d3 /lib/Target/PowerPC/PPCAsmPrinter.cpp
parent33d9b356ab7d75eba8eb70745051794fe8fcc558 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53254 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCAsmPrinter.cpp')
-rw-r--r--lib/Target/PowerPC/PPCAsmPrinter.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp
index 9c9dd391be..ae967a8d00 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,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);