Skip to content

Commit

Permalink
[ORC] Fix -Wunused-but-set-variable in JITLoaderPerf.cpp (NFC)
Browse files Browse the repository at this point in the history
/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.
  • Loading branch information
DamonFool committed Sep 18, 2023
1 parent b8fbc3c commit 54a38c9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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()};
Expand Down

0 comments on commit 54a38c9

Please sign in to comment.