[llvm] 54a38c9 - [ORC] Fix -Wunused-but-set-variable in JITLoaderPerf.cpp (NFC)
Jie Fu via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 17 22:07:01 PDT 2023
Author: Jie Fu
Date: 2023-09-18T13:06:16+08:00
New Revision: 54a38c9c9c46f39dbd159b26626f6ecc2a7944e9
URL: https://github.com/llvm/llvm-project/commit/54a38c9c9c46f39dbd159b26626f6ecc2a7944e9
DIFF: https://github.com/llvm/llvm-project/commit/54a38c9c9c46f39dbd159b26626f6ecc2a7944e9.diff
LOG: [ORC] Fix -Wunused-but-set-variable in JITLoaderPerf.cpp (NFC)
/data/llvm-project/llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderPerf.cpp:118:10: error: variable 'Written' set but not used [-Werror,-Wunused-but-set-variable]
size_t Written = 0;
^
1 error generated.
Added:
Modified:
llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderPerf.cpp
Removed:
################################################################################
diff --git a/llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderPerf.cpp b/llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderPerf.cpp
index 731b4a173850d6a..5e0623102d335fe 100644
--- a/llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderPerf.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderPerf.cpp
@@ -115,7 +115,7 @@ static void writeDebugRecord(const PerfJITDebugInfoRecord &DebugRecord) {
assert(State && "PerfState not initialized");
LLVM_DEBUG(dbgs() << "Writing debug record with "
<< DebugRecord.Entries.size() << " entries\n");
- size_t Written = 0;
+ [[maybe_unused]] size_t Written = 0;
DIR Dir{RecHeader{static_cast<uint32_t>(DebugRecord.Prefix.Id),
DebugRecord.Prefix.TotalSize, perf_get_timestamp()},
DebugRecord.CodeAddr, DebugRecord.Entries.size()};
More information about the llvm-commits
mailing list