Based on the LangRef change in D117890, this uses the elementtype
attribute rather than the pointer element type to determine the
statepoint callee function type, making statepoints compatible
with opaque pointers.
/// Return the type of the value returned by the call underlying the
/// statepoint.
Type *getActualReturnType() const {
- auto *CalleeTy =
- getActualCalledOperand()->getType()->getPointerElementType();
- return cast<FunctionType>(CalleeTy)->getReturnType();
+ auto *FT = cast<FunctionType>(
+ getAttributes().getParamElementType(CalledFunctionPos));
+ return FT->getReturnType();
}
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -verify-machineinstrs < %s | FileCheck %s
+; RUN: llc -verify-machineinstrs -opaque-pointers < %s | FileCheck %s
; This file contains a collection of basic tests to ensure we didn't
; screw up normal call lowering when there are no deopt or gc arguments.