Skip to content

Commit 9ac7388

Browse files
committed
Revert "[NFC] Remove checking pointee type for byval/preallocated type"
This reverts commit 738abfd.
1 parent aa4685c commit 9ac7388

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/include/llvm/IR/InstrTypes.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1729,13 +1729,13 @@ class CallBase : public Instruction {
17291729
/// Extract the byval type for a call or parameter.
17301730
Type *getParamByValType(unsigned ArgNo) const {
17311731
Type *Ty = Attrs.getParamByValType(ArgNo);
1732-
return Ty;
1732+
return Ty ? Ty : getArgOperand(ArgNo)->getType()->getPointerElementType();
17331733
}
17341734

17351735
/// Extract the preallocated type for a call or parameter.
17361736
Type *getParamPreallocatedType(unsigned ArgNo) const {
17371737
Type *Ty = Attrs.getParamPreallocatedType(ArgNo);
1738-
return Ty;
1738+
return Ty ? Ty : getArgOperand(ArgNo)->getType()->getPointerElementType();
17391739
}
17401740

17411741
/// Extract the number of dereferenceable bytes for a call or

0 commit comments

Comments
 (0)