Fix build warning
[oota-llvm.git] / lib / Transforms / Utils / SimplifyCFG.cpp
index 1834b813453a504868c6ab01cb5ec0ca9ad2e367..3fd8c81fe4a8f816fe431e2d4627b6f7fbc5ee74 100644 (file)
@@ -2990,9 +2990,9 @@ bool SimplifyCFGOpt::SimplifyCleanupReturn(CleanupReturnInst *RI) {
          I != IE; ++I) {
       PHINode *DestPN = cast<PHINode>(I);
  
-      unsigned Idx = DestPN->getBasicBlockIndex(BB);
+      int Idx = DestPN->getBasicBlockIndex(BB);
       // Since BB unwinds to UnwindDest, it has to be in the PHI node.
-      assert(Idx != -1);
+      assert(Idx != -1U);
       // This PHI node has an incoming value that corresponds to a control
       // path through the cleanup pad we are removing.  If the incoming
       // value is in the cleanup pad, it must be a PHINode (because we