For switch ABI, the function type is always "void (%frame*)", so
just hardcode that rather than fetching it from a pointer element
type.
FunctionType *getResumeFunctionType() const {
switch (ABI) {
- case coro::ABI::Switch: {
- auto *FnPtrTy = getSwitchResumePointerType();
- return cast<FunctionType>(FnPtrTy->getPointerElementType());
- }
+ case coro::ABI::Switch:
+ return FunctionType::get(Type::getVoidTy(FrameTy->getContext()),
+ FrameTy->getPointerTo(), /*IsVarArg*/false);
case coro::ABI::Retcon:
case coro::ABI::RetconOnce:
return RetconLowering.ResumePrototype->getFunctionType();