diff --git a/llvm/include/llvm/Transforms/Utils/BuildLibCalls.h b/llvm/include/llvm/Transforms/Utils/BuildLibCalls.h --- a/llvm/include/llvm/Transforms/Utils/BuildLibCalls.h +++ b/llvm/include/llvm/Transforms/Utils/BuildLibCalls.h @@ -205,8 +205,8 @@ const TargetLibraryInfo *TLI); /// Emit a call to the calloc function. - Value *emitCalloc(Value *Num, Value *Size, const AttributeList &Attrs, - IRBuilderBase &B, const TargetLibraryInfo &TLI); + Value *emitCalloc(Value *Num, Value *Size, IRBuilderBase &B, + const TargetLibraryInfo &TLI); } #endif diff --git a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp --- a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp +++ b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp @@ -1847,10 +1847,9 @@ const auto &DL = Malloc->getModule()->getDataLayout(); auto *SizeType = DL.getIntPtrType(IRB.GetInsertBlock()->getContext()); - AttributeList EmptyList; - if (auto *Calloc = emitCalloc(ConstantInt::get(SizeType, 1), - Malloc->getArgOperand(0), EmptyList, - IRB, TLI)) { + if (auto *Calloc = + emitCalloc(ConstantInt::get(SizeType, 1), + Malloc->getArgOperand(0), IRB, TLI)) { Malloc->replaceAllUsesWith(Calloc); Malloc->eraseFromParent(); return true; diff --git a/llvm/lib/Transforms/Utils/BuildLibCalls.cpp b/llvm/lib/Transforms/Utils/BuildLibCalls.cpp --- a/llvm/lib/Transforms/Utils/BuildLibCalls.cpp +++ b/llvm/lib/Transforms/Utils/BuildLibCalls.cpp @@ -1655,8 +1655,8 @@ return CI; } -Value *llvm::emitCalloc(Value *Num, Value *Size, const AttributeList &Attrs, - IRBuilderBase &B, const TargetLibraryInfo &TLI) { +Value *llvm::emitCalloc(Value *Num, Value *Size, IRBuilderBase &B, + const TargetLibraryInfo &TLI) { if (!TLI.has(LibFunc_calloc)) return nullptr; @@ -1664,8 +1664,8 @@ StringRef CallocName = TLI.getName(LibFunc_calloc); const DataLayout &DL = M->getDataLayout(); IntegerType *PtrType = DL.getIntPtrType((B.GetInsertBlock()->getContext())); - FunctionCallee Calloc = M->getOrInsertFunction( - CallocName, Attrs, B.getInt8PtrTy(), PtrType, PtrType); + FunctionCallee Calloc = + M->getOrInsertFunction(CallocName, B.getInt8PtrTy(), PtrType, PtrType); inferLibFuncAttributes(M, CallocName, TLI); CallInst *CI = B.CreateCall(Calloc, {Num, Size}, CallocName);