Skip to content

Commit 78739ff

Browse files
[llvm][HashRecognize] Fix compiler warning on Arm 32-bit (#161821)
``` /home/david.spickett/llvm-project/llvm/lib/Analysis/HashRecognize.cpp:100:54: warning: comparison of integers of different signs: 'typename iterator_traits<ilist_iterator_w_bits<node_options<Instruction, true, false, void, true, BasicBlock>, false, false>>::difference_type' (aka 'int') and 'size_type' (aka 'unsigned int') [-Wsign-compare] 100 | return std::distance(Latch->begin(), Latch->end()) != Visited.size(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ ``` By using Latch->size() instead.
1 parent f4a39a8 commit 78739ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Analysis/HashRecognize.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ static bool containsUnreachable(const Loop &L,
9797
}
9898
}
9999
}
100-
return std::distance(Latch->begin(), Latch->end()) != Visited.size();
100+
return Latch->size() != Visited.size();
101101
}
102102

103103
/// A structure that can hold either a Simple Recurrence or a Conditional

0 commit comments

Comments
 (0)