forked from OSchip/llvm-project
[IR] Remove unused parameter (NFC)
This commit is contained in:
parent
1b736bda3b
commit
d34d2bbe5d
|
@ -158,7 +158,7 @@ bool Argument::hasPointeeInMemoryValueAttr() const {
|
|||
|
||||
/// For a byval, sret, inalloca, or preallocated parameter, get the in-memory
|
||||
/// parameter type.
|
||||
static Type *getMemoryParamAllocType(AttributeSet ParamAttrs, Type *ArgTy) {
|
||||
static Type *getMemoryParamAllocType(AttributeSet ParamAttrs) {
|
||||
// FIXME: All the type carrying attributes are mutually exclusive, so there
|
||||
// should be a single query to get the stored type that handles any of them.
|
||||
if (Type *ByValTy = ParamAttrs.getByValType())
|
||||
|
@ -178,7 +178,7 @@ static Type *getMemoryParamAllocType(AttributeSet ParamAttrs, Type *ArgTy) {
|
|||
uint64_t Argument::getPassPointeeByValueCopySize(const DataLayout &DL) const {
|
||||
AttributeSet ParamAttrs =
|
||||
getParent()->getAttributes().getParamAttrs(getArgNo());
|
||||
if (Type *MemTy = getMemoryParamAllocType(ParamAttrs, getType()))
|
||||
if (Type *MemTy = getMemoryParamAllocType(ParamAttrs))
|
||||
return DL.getTypeAllocSize(MemTy);
|
||||
return 0;
|
||||
}
|
||||
|
@ -186,7 +186,7 @@ uint64_t Argument::getPassPointeeByValueCopySize(const DataLayout &DL) const {
|
|||
Type *Argument::getPointeeInMemoryValueType() const {
|
||||
AttributeSet ParamAttrs =
|
||||
getParent()->getAttributes().getParamAttrs(getArgNo());
|
||||
return getMemoryParamAllocType(ParamAttrs, getType());
|
||||
return getMemoryParamAllocType(ParamAttrs);
|
||||
}
|
||||
|
||||
unsigned Argument::getParamAlignment() const {
|
||||
|
|
Loading…
Reference in New Issue