diff options
author | Duncan Sands <baldrick@free.fr> | 2007-07-06 14:46:23 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2007-07-06 14:46:23 +0000 |
commit | f664e41b201bad27ed3661bf50cd71f54242c114 (patch) | |
tree | 883e6e4e8708942497327e75f0b97e46b1ba7e32 /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | d8ebb3a0c2b42c5dedf96cfb7f2f3e87c91e1c23 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37947 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 8af76b1cd1..3312542d39 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/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; |