forked from OSchip/llvm-project
[Coroutines] Avoid pointer element access for resume function type
For switch ABI, the function type is always "void (%frame*)", so just hardcode that rather than fetching it from a pointer element type.
This commit is contained in:
parent
acf77bd2fd
commit
e81f566de6
|
@ -210,10 +210,9 @@ struct LLVM_LIBRARY_VISIBILITY Shape {
|
|||
|
||||
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();
|
||||
|
|
Loading…
Reference in New Issue