[llvm] Mark variable as maybe unused (only used in debug mode) (PR #157875)
Karlo Basioli via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 10 08:10:28 PDT 2025
https://github.com/basioli-k created https://github.com/llvm/llvm-project/pull/157875
None
>From c9d10b99ad8d55f7f14a4c11c18dd72e5ba1d94f Mon Sep 17 00:00:00 2001
From: basioli-k <k.basioli at gmail.com>
Date: Wed, 10 Sep 2025 15:09:41 +0000
Subject: [PATCH] Mark variable as maybe unused (only used in debug mode)
---
llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
index fab2ba5e4f88f..e2da9aa7b7c1c 100644
--- a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
@@ -3903,7 +3903,7 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
ReturnType->getPrimitiveSizeInBits());
if (I.arg_size() == 3) {
- auto *AccumulatorType = cast<FixedVectorType>(I.getOperand(0)->getType());
+ [[maybe_unused]] auto *AccumulatorType = cast<FixedVectorType>(I.getOperand(0)->getType());
assert(AccumulatorType == ReturnType);
}
More information about the llvm-commits
mailing list