[llvm] cd80ed4 - [llvm-exegesis] Fix -Wunused-variable in BenchmarkRunner.cpp (NFC)
Jie Fu via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 23 02:32:59 PDT 2024
Author: Jie Fu
Date: 2024-09-23T17:32:11+08:00
New Revision: cd80ed424b13790a65365a0145fa9b1b51b13680
URL: https://github.com/llvm/llvm-project/commit/cd80ed424b13790a65365a0145fa9b1b51b13680
DIFF: https://github.com/llvm/llvm-project/commit/cd80ed424b13790a65365a0145fa9b1b51b13680.diff
LOG: [llvm-exegesis] Fix -Wunused-variable in BenchmarkRunner.cpp (NFC)
/llvm-project/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp:415:18:
error: unused variable 'CurrentCPU' [-Werror,-Wunused-variable]
unsigned int CurrentCPU;
^
1 error generated.
Added:
Modified:
llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
Removed:
################################################################################
diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp b/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
index ffb1b84d567c05..27ad7508756f10 100644
--- a/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
+++ b/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
@@ -412,7 +412,7 @@ class SubProcessFunctionExecutorImpl
// Check (if assertions are enabled) that we are actually running on the
// CPU that was specified by the user.
- unsigned int CurrentCPU;
+ [[maybe_unused]] unsigned int CurrentCPU;
assert(getcpu(&CurrentCPU, nullptr) == 0 &&
"Expected getcpu call to succeed.");
assert(static_cast<int>(CurrentCPU) == CPUToUse &&
More information about the llvm-commits
mailing list