diff --git a/lib/CodeGen/LLVMTargetMachine.cpp b/lib/CodeGen/LLVMTargetMachine.cpp index 500f0e0941c..4e3982df62a 100644 --- a/lib/CodeGen/LLVMTargetMachine.cpp +++ b/lib/CodeGen/LLVMTargetMachine.cpp @@ -43,11 +43,10 @@ LLVMTargetMachine::addPassesToEmitFile(FunctionPassManager &PM, // FIXME: Implement efficient support for garbage collection intrinsics. PM.add(createLowerGCPass()); - - // FIXME: Implement the invoke/unwind instructions! + if (!ExceptionHandling) PM.add(createLowerInvokePass(getTargetLowering())); - + // Make sure that no unreachable blocks are instruction selected. PM.add(createUnreachableBlockEliminationPass());