forked from OSchip/llvm-project
[Statepoint] Determine return type from elementtype attribute
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.
This commit is contained in:
parent
8f8e13056a
commit
f62a400cdf
|
@ -121,9 +121,9 @@ public:
|
|||
/// 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();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
; 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.
|
||||
|
||||
|
|
Loading…
Reference in New Issue