From a1014a9420c3a70b4f123dd2c016e0209b81cb9d Mon Sep 17 00:00:00 2001 From: Carlos Alberto Enciso Date: Wed, 22 May 2024 06:41:27 +0100 Subject: [PATCH] [indvars] Missing variables at Og: https://bugs.llvm.org/show_bug.cgi?id=51735 https://github.com/llvm/llvm-project/issues/51077 Address @OCHyams comments about DbgUsers type. - Converted to 'const SmallVectorImpl reference'. --- llvm/include/llvm/Analysis/LoopInfo.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/llvm/include/llvm/Analysis/LoopInfo.h b/llvm/include/llvm/Analysis/LoopInfo.h index e8370bbea5735c7..28c888f0c9a1c40 100644 --- a/llvm/include/llvm/Analysis/LoopInfo.h +++ b/llvm/include/llvm/Analysis/LoopInfo.h @@ -398,9 +398,10 @@ class LLVM_EXTERNAL_VISIBILITY Loop : public LoopBase { /// 'indvars' pass if the loop can deleted. Those debug users will be used /// by the 'loop-delete' pass. void preserveDebugInductionVariableInfo( - Value *FinalValue, SmallVector DbgUsers) { + Value *FinalValue, + const SmallVectorImpl &DbgUsers) { IndVarFinalValue = FinalValue; - for (DbgVariableIntrinsic *DebugUser : DbgUsers) + for (auto &DebugUser : DbgUsers) IndVarDebugUsers.push_back(DebugUser); }