aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2022-04-05 11:34:05 +0300
committerMartin Storsjö <martin@martin.st>2022-04-06 10:01:46 +0300
commit46776f7556a337ebf210b1cac838bca2aaa15351 (patch)
tree0c8a3c0d2a33b24c335a0c980be3a145859362a4 /llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
parent1558cddedb4999bbbae45a946e08521cff59fdbd (diff)
downloadllvm-46776f7556a337ebf210b1cac838bca2aaa15351.zip
llvm-46776f7556a337ebf210b1cac838bca2aaa15351.tar.gz
llvm-46776f7556a337ebf210b1cac838bca2aaa15351.tar.bz2
Fix warnings about variables that are set but only used in debug mode
Add void casts to mark the variables used, next to the places where they are used in assert or `LLVM_DEBUG()` expressions. Differential Revision: https://reviews.llvm.org/D123117
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyIndVar.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/SimplifyIndVar.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp b/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
index 3b0bd86..71cce3e 100644
--- a/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
@@ -870,6 +870,7 @@ void SimplifyIndvar::simplifyUsers(PHINode *CurrIV, IVVisitor *V) {
Instruction *IVOperand = UseOper.second;
for (unsigned N = 0; IVOperand; ++N) {
assert(N <= Simplified.size() && "runaway iteration");
+ (void) N;
Value *NewOper = foldIVUser(UseInst, IVOperand);
if (!NewOper)