[llvm] d34d2bb - [IR] Remove unused parameter (NFC)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 10 09:16:30 PDT 2021


Author: Nikita Popov
Date: 2021-09-10T18:16:22+02:00
New Revision: d34d2bbe5d88c1b652887b72600791f4f9435f4a

URL: https://github.com/llvm/llvm-project/commit/d34d2bbe5d88c1b652887b72600791f4f9435f4a
DIFF: https://github.com/llvm/llvm-project/commit/d34d2bbe5d88c1b652887b72600791f4f9435f4a.diff

LOG: [IR] Remove unused parameter (NFC)

Added: 
    

Modified: 
    llvm/lib/IR/Function.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp
index ef3bc1cee44c..e8fbcfb8700a 100644
--- a/llvm/lib/IR/Function.cpp
+++ b/llvm/lib/IR/Function.cpp
@@ -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 {


        


More information about the llvm-commits mailing list