[llvm] 2fc1b3d - [MemorySanitizer] Fix an unused-variable warning (NFC)
Jie Fu via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 11 16:52:51 PDT 2025
Author: Jie Fu
Date: 2025-08-12T07:51:53+08:00
New Revision: 2fc1b3dd9f82e020c07ff6ec82a55bb7f4c90ac8
URL: https://github.com/llvm/llvm-project/commit/2fc1b3dd9f82e020c07ff6ec82a55bb7f4c90ac8
DIFF: https://github.com/llvm/llvm-project/commit/2fc1b3dd9f82e020c07ff6ec82a55bb7f4c90ac8.diff
LOG: [MemorySanitizer] Fix an unused-variable warning (NFC)
/llvm-project/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:2752:22:
error: unused variable 'ParamType' [-Werror,-Wunused-variable]
FixedVectorType *ParamType =
^
1 error generated.
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 65528de8e7ac1..21bd4164385ab 100644
--- a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
@@ -2749,7 +2749,7 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
assert(I.getType()->isVectorTy());
assert(I.getArgOperand(0)->getType()->isVectorTy());
- FixedVectorType *ParamType =
+ [[maybe_unused]] FixedVectorType *ParamType =
cast<FixedVectorType>(I.getArgOperand(0)->getType());
assert((I.arg_size() != 2) ||
(ParamType == cast<FixedVectorType>(I.getArgOperand(1)->getType())));
More information about the llvm-commits
mailing list