[llvm] 1b95e76 - [Instrumentation] Fix a warning
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 4 08:31:46 PST 2024
Author: Kazu Hirata
Date: 2024-12-04T08:31:40-08:00
New Revision: 1b95e76d8f10725f73c706881ccc49669e151f38
URL: https://github.com/llvm/llvm-project/commit/1b95e76d8f10725f73c706881ccc49669e151f38
DIFF: https://github.com/llvm/llvm-project/commit/1b95e76d8f10725f73c706881ccc49669e151f38.diff
LOG: [Instrumentation] Fix a warning
This patch fixes:
llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:3840:14:
error: unused variable 'NumArgOperands' [-Werror,-Wunused-variable]
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 b9e92e0d66df2d..5c419c6374bdd7 100644
--- a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
@@ -3837,8 +3837,7 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
// the second argument is guranteed to be a constant integer.
void handleRoundPdPsIntrinsic(IntrinsicInst &I) {
assert(I.getArgOperand(0)->getType() == I.getType());
- unsigned NumArgOperands = I.arg_size();
- assert(NumArgOperands == 2);
+ assert(I.arg_size() == 2);
assert(isa<ConstantInt>(I.getArgOperand(1)));
IRBuilder<> IRB(&I);
More information about the llvm-commits
mailing list