[llvm] r273752 - Silence a -Wsign-compare warning
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 24 17:04:06 PDT 2016
Author: majnemer
Date: Fri Jun 24 19:04:06 2016
New Revision: 273752
URL: http://llvm.org/viewvc/llvm-project?rev=273752&view=rev
Log:
Silence a -Wsign-compare warning
Modified:
llvm/trunk/lib/Transforms/Utils/MemorySSA.cpp
Modified: llvm/trunk/lib/Transforms/Utils/MemorySSA.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/MemorySSA.cpp?rev=273752&r1=273751&r2=273752&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/MemorySSA.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/MemorySSA.cpp Fri Jun 24 19:04:06 2016
@@ -763,8 +763,8 @@ void MemorySSA::verifyDefUses(Function &
for (BasicBlock &B : F) {
// Phi nodes are attached to basic blocks
if (MemoryPhi *Phi = getMemoryAccess(&B)) {
- assert(Phi->getNumOperands() ==
- std::distance(pred_begin(&B), pred_end(&B)) &&
+ assert(Phi->getNumOperands() == static_cast<unsigned>(std::distance(
+ pred_begin(&B), pred_end(&B))) &&
"Incomplete MemoryPhi Node");
for (unsigned I = 0, E = Phi->getNumIncomingValues(); I != E; ++I)
verifyUseInDefs(Phi->getIncomingValue(I), Phi);
More information about the llvm-commits
mailing list