Commit 5859523
committed
[llvm][HashRecognize] Fix compiler warning on Arm 32-bit
/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();
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
With a static cast to size_t.
I thought about using Latch->size() but this skips a call to `It.setHeadBit(true);`
and I'm not sure whether that would make a difference in this context.1 parent 1a07e67 commit 5859523
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
| 101 | + | |
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
| |||
0 commit comments