1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00

Revert "[NFC] Remove checking pointee type for byval/preallocated type"

This reverts commit 738abfdbea21acd2597d83ad3390daf5696b6d07.
This commit is contained in:
Jorge Gorbe Moya 2021-06-17 12:17:07 -07:00
parent 81cd78135c
commit 70dce4754b

View File

@ -1729,13 +1729,13 @@ public:
/// Extract the byval type for a call or parameter. /// Extract the byval type for a call or parameter.
Type *getParamByValType(unsigned ArgNo) const { Type *getParamByValType(unsigned ArgNo) const {
Type *Ty = Attrs.getParamByValType(ArgNo); Type *Ty = Attrs.getParamByValType(ArgNo);
return Ty; return Ty ? Ty : getArgOperand(ArgNo)->getType()->getPointerElementType();
} }
/// Extract the preallocated type for a call or parameter. /// Extract the preallocated type for a call or parameter.
Type *getParamPreallocatedType(unsigned ArgNo) const { Type *getParamPreallocatedType(unsigned ArgNo) const {
Type *Ty = Attrs.getParamPreallocatedType(ArgNo); Type *Ty = Attrs.getParamPreallocatedType(ArgNo);
return Ty; return Ty ? Ty : getArgOperand(ArgNo)->getType()->getPointerElementType();
} }
/// Extract the number of dereferenceable bytes for a call or /// Extract the number of dereferenceable bytes for a call or