forked from OSchip/llvm-project
[GVNHoist] Fix a signed/unsigned comparison warning that occurs in 32-bit builds with gcc.
std::distance returns ptrdiff_t which is signed. 64-bit builds don't notice because type promotion widens the unsigned first. llvm-svn: 318354
This commit is contained in:
parent
e4572c6b73
commit
062bcf30b1
|
@ -578,7 +578,7 @@ private:
|
|||
|
||||
// Returns true when the values are flowing out to each edge.
|
||||
bool valueAnticipable(CHIArgs C, TerminatorInst *TI) const {
|
||||
if (TI->getNumSuccessors() > std::distance(C.begin(), C.end()))
|
||||
if (TI->getNumSuccessors() > (unsigned)std::distance(C.begin(), C.end()))
|
||||
return false; // Not enough args in this CHI.
|
||||
|
||||
for (auto CHI : C) {
|
||||
|
|
Loading…
Reference in New Issue