diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp index 59f6f5e119e82..31c3d30065f5f 100644 --- a/llvm/lib/IR/Instructions.cpp +++ b/llvm/lib/IR/Instructions.cpp @@ -163,7 +163,7 @@ void PHINode::removeIncomingValueIf(function_ref Predicate, U.set(nullptr); // Remove incoming blocks. - std::remove_if(const_cast(block_begin()), + (void)std::remove_if(const_cast(block_begin()), const_cast(block_end()), [&](BasicBlock *&BB) { return RemoveIndices.contains(&BB - block_begin()); });