Skip to content

Commit 54a38c9

Browse files
committed
[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.
1 parent b8fbc3c commit 54a38c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderPerf.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ static void writeDebugRecord(const PerfJITDebugInfoRecord &DebugRecord) {
115115
assert(State && "PerfState not initialized");
116116
LLVM_DEBUG(dbgs() << "Writing debug record with "
117117
<< DebugRecord.Entries.size() << " entries\n");
118-
size_t Written = 0;
118+
[[maybe_unused]] size_t Written = 0;
119119
DIR Dir{RecHeader{static_cast<uint32_t>(DebugRecord.Prefix.Id),
120120
DebugRecord.Prefix.TotalSize, perf_get_timestamp()},
121121
DebugRecord.CodeAddr, DebugRecord.Entries.size()};

0 commit comments

Comments
 (0)