Exit early if exception handling isn't supported.

llvm-svn: 81454
This commit is contained in:
Bill Wendling 2009-09-10 18:28:06 +00:00
parent 7736e2ad98
commit 9535ae42ff
1 changed files with 13 additions and 13 deletions

View File

@ -918,13 +918,14 @@ void DwarfException::EndModule() {
/// BeginFunction - Gather pre-function exception information. Assumes it's
/// being emitted immediately after the function entry point.
void DwarfException::BeginFunction(MachineFunction *MF) {
if (!MMI || !MAI->doesSupportExceptionHandling()) return;
if (TimePassesIsEnabled)
ExceptionTimer->startTimer();
this->MF = MF;
shouldEmitTable = shouldEmitMoves = false;
if (MMI && MAI->doesSupportExceptionHandling()) {
// Map all labels and get rid of any dead landing pads.
MMI->TidyLandingPads();
@ -939,7 +940,6 @@ void DwarfException::BeginFunction(MachineFunction *MF) {
if (shouldEmitMoves || shouldEmitTable)
// Assumes in correct section after the entry point.
EmitLabel("eh_func_begin", ++SubprogramCount);
}
shouldEmitTableModule |= shouldEmitTable;
shouldEmitMovesModule |= shouldEmitMoves;