From 9d97420473c99e761fcea0280cfa85a38ff6d6d9 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Fri, 6 Jul 2007 14:46:23 +0000 Subject: The exception handling intrinsics return values, so must be lowered to a value, not nothing at all. Subtle point: I made eh_selector return 0 and eh_typeid_for return 1. This means that only cleanups (destructors) will be run as the exception unwinds [if eh_typeid_for returned 0 then it would be as if the first catch always matched, and the corresponding handler would be run], which is probably want you want in the CBE. llvm-svn: 37947 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp') diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 8af76b1cd18..3312542d390 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -2716,7 +2716,8 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) { unsigned TypeID = MMI->getTypeIDFor(GV); setValue(&I, DAG.getConstant(TypeID, MVT::i32)); } else { - setValue(&I, DAG.getConstant(0, MVT::i32)); + // Return something different to eh_selector. + setValue(&I, DAG.getConstant(1, MVT::i32)); } return 0; -- cgit v1.2.3