Skip to content

Commit 2491dc3

Browse files
[Utils] Fix a warning
This patch fixes: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:338:6: error: unused function 'isSelectInRoleOfConjunctionOrDisjunction' [-Werror,-Wunused-function]
1 parent b8eaceb commit 2491dc3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Transforms/Utils/SimplifyCFG.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,8 @@ class SimplifyCFGOpt {
335335
// we synthesize a || b as select a, true, b
336336
// we synthesize a && b as select a, b, false
337337
// this function determines if SI is playing one of those roles.
338-
bool isSelectInRoleOfConjunctionOrDisjunction(const SelectInst *SI) {
338+
[[maybe_unused]] bool
339+
isSelectInRoleOfConjunctionOrDisjunction(const SelectInst *SI) {
339340
return ((isa<ConstantInt>(SI->getTrueValue()) &&
340341
(dyn_cast<ConstantInt>(SI->getTrueValue())->isOne())) ||
341342
(isa<ConstantInt>(SI->getFalseValue()) &&

0 commit comments

Comments
 (0)