[llvm] 3c60c03 - Mark variable as maybe unused (only used in debug mode) (#157875)

via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 10 08:10:36 PDT 2025


Author: Karlo Basioli
Date: 2025-09-10T16:10:32+01:00
New Revision: 3c60c03f538f7da6a58f79d6979d6a87e06b8e72

URL: https://github.com/llvm/llvm-project/commit/3c60c03f538f7da6a58f79d6979d6a87e06b8e72
DIFF: https://github.com/llvm/llvm-project/commit/3c60c03f538f7da6a58f79d6979d6a87e06b8e72.diff

LOG: Mark variable as maybe unused (only used in debug mode) (#157875)

Added: 
    

Modified: 
    llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp

Removed: 
    


################################################################################
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