-/// IsNoReturn - Return true if the specified call is to a no-return function.
-static bool IsNoReturn(const CallInst *CI) {
- if (const ParamAttrsList *Attrs = CI->getParamAttrs())
- if (Attrs->paramHasAttr(0, ParamAttr::NoReturn))
- return true;
-
- if (const Function *Callee = CI->getCalledFunction())
- if (const ParamAttrsList *Attrs = Callee->getParamAttrs())
- if (Attrs->paramHasAttr(0, ParamAttr::NoReturn))
- return true;
-
- return false;
-}
-
-/// IsNoUnwind - Return true if the specified invoke is to a no-unwind function.
-static bool IsNoUnwind(const InvokeInst *II) {
- if (const ParamAttrsList *Attrs = II->getParamAttrs())
- if (Attrs->paramHasAttr(0, ParamAttr::NoUnwind))
- return true;
-
- if (const Function *Callee = II->getCalledFunction())
- if (const ParamAttrsList *Attrs = Callee->getParamAttrs())
- if (Attrs->paramHasAttr(0, ParamAttr::NoUnwind))
- return true;
-
- return false;
-}
-
-