diff --git a/llvm/lib/Transforms/Scalar/SROA.cpp b/llvm/lib/Transforms/Scalar/SROA.cpp
index e88c130cccf20..69e7ce83f82e4 100644
--- a/llvm/lib/Transforms/Scalar/SROA.cpp
+++ b/llvm/lib/Transforms/Scalar/SROA.cpp
@@ -252,7 +252,7 @@ class SROA {
std::pair runOnAlloca(AllocaInst &AI);
void clobberUse(Use &U);
bool deleteDeadInstructions(SmallPtrSetImpl &DeletedAllocas);
- bool promoteAllocas(Function &F);
+ bool promoteAllocas();
};
} // end anonymous namespace
@@ -5693,7 +5693,7 @@ bool SROA::deleteDeadInstructions(
/// This attempts to promote whatever allocas have been identified as viable in
/// the PromotableAllocas list. If that list is empty, there is nothing to do.
/// This function returns whether any promotion occurred.
-bool SROA::promoteAllocas(Function &F) {
+bool SROA::promoteAllocas() {
if (PromotableAllocas.empty())
return false;
@@ -5750,7 +5750,7 @@ std::pair SROA::runSROA(Function &F) {
}
}
- Changed |= promoteAllocas(F);
+ Changed |= promoteAllocas();
Worklist = PostPromotionWorklist;
PostPromotionWorklist.clear();