From e077c1f5df9b886acb843d90f7e3a5a55ed560de Mon Sep 17 00:00:00 2001 From: Sohaib Iftikhar Date: Mon, 13 Oct 2025 14:24:06 +0000 Subject: [PATCH] [LLVM][CppCompile] Fix unused variable warning after 0e025418 Fixes unused variable warning for libTransform with non debug builds. Folds the unused variable into the assert. --- llvm/lib/Transforms/Utils/SSAUpdaterBulk.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/llvm/lib/Transforms/Utils/SSAUpdaterBulk.cpp b/llvm/lib/Transforms/Utils/SSAUpdaterBulk.cpp index ccb86eb2cb0fc..fb39fddde72e2 100644 --- a/llvm/lib/Transforms/Utils/SSAUpdaterBulk.cpp +++ b/llvm/lib/Transforms/Utils/SSAUpdaterBulk.cpp @@ -269,8 +269,7 @@ static bool replaceIfIdentical(PHINode &PHI, PHINode &ReplPHI) { bool EliminateNewDuplicatePHINodes(BasicBlock *BB, BasicBlock::phi_iterator FirstExistingPN) { - auto NewPHIs = make_range(BB->phis().begin(), FirstExistingPN); - assert(!PHIAreRefEachOther(NewPHIs)); + assert(!PHIAreRefEachOther(make_range(BB->phis().begin(), FirstExistingPN))); // Deduplicate new PHIs first to reduce the number of comparisons on the // following new -> existing pass.