diff --git a/llvm/lib/Transforms/Scalar/SCCP.cpp b/llvm/lib/Transforms/Scalar/SCCP.cpp index 6ef7a2013f09..d7a541dbe5c2 100644 --- a/llvm/lib/Transforms/Scalar/SCCP.cpp +++ b/llvm/lib/Transforms/Scalar/SCCP.cpp @@ -1510,7 +1510,7 @@ bool SCCPSolver::ResolvedUndefsIn(Function &F) { return false; } -static bool tryToReplaceWithConstant(SCCPSolver Solver, Value *V) { +static bool tryToReplaceWithConstant(SCCPSolver &Solver, Value *V) { Constant *Const = nullptr; if (V->getType()->isStructTy()) { std::vector IVs = Solver.getStructLatticeValueFor(V); @@ -1540,7 +1540,7 @@ static bool tryToReplaceWithConstant(SCCPSolver Solver, Value *V) { return true; } -static bool tryToReplaceInstWithConstant(SCCPSolver Solver, Instruction *Inst, +static bool tryToReplaceInstWithConstant(SCCPSolver &Solver, Instruction *Inst, bool shouldEraseFromParent) { if (!tryToReplaceWithConstant(Solver, Inst)) return false;