Integrate exception filter support and exception catch support. This
simplifies the code in DwarfWriter, allows for multiple filters and
makes it trivial to specify filters accompanied by cleanups or catch-all
specifications (see next patch). What a deal! Patch blessed by Anton.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37398 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index cfdf6d0..6b6834b 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -2611,8 +2611,6 @@
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.
@@ -2624,7 +2622,10 @@
"TypeInfo must be a global variable or NULL");
TyInfo.push_back(GV);
}
- MMI->addCatchTypeInfo(CurMBB, TyInfo);
+ if (Intrinsic == Intrinsic::eh_filter)
+ MMI->addFilterTypeInfo(CurMBB, TyInfo);
+ else
+ MMI->addCatchTypeInfo(CurMBB, TyInfo);
// Mark exception selector register as live in.
unsigned Reg = TLI.getExceptionSelectorRegister();