Constant *FrameAddrFn;
Constant *LSDAAddrFn;
Value *PersonalityFn;
- Constant *Selector32Fn;
- Constant *Selector64Fn;
+ Constant *SelectorFn;
Constant *ExceptionFn;
Value *CallSite;
FrameAddrFn = Intrinsic::getDeclaration(&M, Intrinsic::frameaddress);
BuiltinSetjmpFn = Intrinsic::getDeclaration(&M, Intrinsic::eh_sjlj_setjmp);
LSDAAddrFn = Intrinsic::getDeclaration(&M, Intrinsic::eh_sjlj_lsda);
- Selector32Fn = Intrinsic::getDeclaration(&M, Intrinsic::eh_selector_i32);
- Selector64Fn = Intrinsic::getDeclaration(&M, Intrinsic::eh_selector_i64);
+ SelectorFn = Intrinsic::getDeclaration(&M, Intrinsic::eh_selector);
ExceptionFn = Intrinsic::getDeclaration(&M, Intrinsic::eh_exception);
PersonalityFn = 0;
for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) {
for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) {
if (CallInst *CI = dyn_cast<CallInst>(I)) {
- if (CI->getCalledFunction() == Selector32Fn ||
- CI->getCalledFunction() == Selector64Fn) {
+ if (CI->getCalledFunction() == SelectorFn) {
if (!PersonalityFn) PersonalityFn = CI->getOperand(2);
EH_Selectors.push_back(CI);
} else if (CI->getCalledFunction() == ExceptionFn) {