Skip to content

Commit 36ac72f

Browse files
committed
[llvm][MemProf] Fix unused variable warning in release build
g++-13 warned that: llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp:1645:8: warning: variable ‘PrevIterCreatedNode’ set but not used [-Wunused-but-set-variable] 1645 | bool PrevIterCreatedNode = false; | ^~~~~~~~~~~~~~~~~~~ When asserts were not enabled.
1 parent 41c8df1 commit 36ac72f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1642,7 +1642,7 @@ void CallsiteContextGraph<DerivedCCG, FuncTy, CallTy>::
16421642
// this entry.
16431643
DenseSet<uint32_t> LastNodeContextIds = LastNode->getContextIds();
16441644

1645-
bool PrevIterCreatedNode = false;
1645+
[[maybe_unused]] bool PrevIterCreatedNode = false;
16461646
bool CreatedNode = false;
16471647
for (unsigned I = 0; I < Calls.size();
16481648
I++, PrevIterCreatedNode = CreatedNode) {

0 commit comments

Comments
 (0)