unconditionally compute MMI even if the target doesn't support EH or Debug info, because the target may use it for other things, this fixes PR5036

llvm-svn: 82684
This commit is contained in:
Chris Lattner 2009-09-24 05:44:53 +00:00
parent 4e37f877b5
commit 87d8f2b9d5
1 changed files with 6 additions and 9 deletions

View File

@ -130,15 +130,12 @@ bool AsmPrinter::doInitialization(Module &M) {
<< '\n' << MAI->getCommentString()
<< " End of file scope inline assembly\n";
if (MAI->doesSupportDebugInformation() ||
MAI->doesSupportExceptionHandling()) {
MMI = getAnalysisIfAvailable<MachineModuleInfo>();
if (MMI)
MMI->AnalyzeModule(M);
DW = getAnalysisIfAvailable<DwarfWriter>();
if (DW)
DW->BeginModule(&M, MMI, O, this, MAI);
}
MMI = getAnalysisIfAvailable<MachineModuleInfo>();
if (MMI)
MMI->AnalyzeModule(M);
DW = getAnalysisIfAvailable<DwarfWriter>();
if (DW)
DW->BeginModule(&M, MMI, O, this, MAI);
return false;
}