Lower eh filter intrinsic.
authorJim Laskey <jlaskey@mac.com>
Thu, 1 Mar 2007 20:24:30 +0000 (20:24 +0000)
committerJim Laskey <jlaskey@mac.com>
Thu, 1 Mar 2007 20:24:30 +0000 (20:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34802 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/IntrinsicLowering.cpp
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

index 09709fedaedb4e3e65101d636e60d953ed407817..3cfa436935f9b73c8c5e22f46a1e5484e1b3f97e 100644 (file)
@@ -358,6 +358,7 @@ void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) {
   case Intrinsic::dbg_declare:
   case Intrinsic::eh_exception:
   case Intrinsic::eh_selector:
+  case Intrinsic::eh_filter:
     break;    // Simply strip out debugging and eh intrinsics
 
   case Intrinsic::memcpy_i32:
index 57e32b3974bdd00f9a2ca719b58da6ba8eb51e93..afaf7826f68b0e958ca3361486726bf4b95480a5 100644 (file)
@@ -2110,7 +2110,8 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
     return 0;
   }
 
-  case Intrinsic::eh_selector: {
+  case Intrinsic::eh_selector:
+  case Intrinsic::eh_filter:{
     MachineModuleInfo *MMI = DAG.getMachineModuleInfo();
     
     if (MMI) {
@@ -2120,6 +2121,8 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
              isa<Function>(CE->getOperand(0)) &&
              "Personality should be a function");
       MMI->addPersonality(CurMBB, cast<Function>(CE->getOperand(0)));
+      if (Intrinsic == Intrinsic::eh_filter)
+        MMI->setIsFilterLandingPad(CurMBB);
 
       // Gather all the type infos for this landing pad and pass them along to
       // MachineModuleInfo.