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 @@ -1856,10 +1856,9 @@ memoryIsNotModifiedBetween(Malloc, MemSet, BatchAA, DL, &DT)) { IRBuilder<> IRB(Malloc); const auto &DL = Malloc->getModule()->getDataLayout(); - AttributeList EmptyList; - if (auto *Calloc = emitCalloc( - ConstantInt::get(IRB.getIntPtrTy(DL), 1), - Malloc->getArgOperand(0), EmptyList, IRB, TLI)) { + if (auto *Calloc = + emitCalloc(ConstantInt::get(IRB.getIntPtrTy(DL), 1), + Malloc->getArgOperand(0), IRB, TLI)) { MemorySSAUpdater Updater(&MSSA); auto *LastDef = cast( Updater.getMemorySSA()->getMemoryAccess(Malloc)); 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);