Enable exception handling int JIT
[oota-llvm.git] / lib / CodeGen / LLVMTargetMachine.cpp
index 351554bb193e9c6d57006e17f747883d3c03aa26..5611b03ba764f2bc3aea397f91da7700753e39d2 100644 (file)
@@ -186,8 +186,8 @@ bool LLVMTargetMachine::addPassesToEmitMachineCode(FunctionPassManager &PM,
   
   PM.add(createGCLoweringPass());
   
-  // FIXME: Implement the invoke/unwind instructions!
-  PM.add(createLowerInvokePass(getTargetLowering()));
+  if (!ExceptionHandling)
+    PM.add(createLowerInvokePass(getTargetLowering()));
   
   // Make sure that no unreachable blocks are instruction selected.
   PM.add(createUnreachableBlockEliminationPass());