Skip to content

Commit 738abfd

Browse files
committed
[NFC] Remove checking pointee type for byval/preallocated type
These currently always require a type parameter. The bitcode reader already upgrades old bitcode without the type parameter to use the pointee type.
1 parent 868317b commit 738abfd

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 ? Ty : getArgOperand(ArgNo)->getType()->getPointerElementType();
1732+
return Ty;
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 ? Ty : getArgOperand(ArgNo)->getType()->getPointerElementType();
1738+
return Ty;
17391739
}
17401740

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

0 commit comments

Comments
 (0)