Fix build after r257064: we should be returning false, not nullptr
authorSilviu Baranga <silviu.baranga@arm.com>
Thu, 7 Jan 2016 15:09:22 +0000 (15:09 +0000)
committerSilviu Baranga <silviu.baranga@arm.com>
Thu, 7 Jan 2016 15:09:22 +0000 (15:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257067 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/InstCombine/InstCombineCompares.cpp

index 64d55e51f65648f1575f8f4b588c6338a1b82792..09c8d77c538ed0d2ea07a8f9a04ca916f1518ab4 100644 (file)
@@ -636,7 +636,7 @@ static bool canRewriteGEPAsOffset(Value *Start, Value *Base,
       if (isa<IntToPtrInst>(V) || isa<PtrToIntInst>(V)) {
         auto *CI = dyn_cast<CastInst>(V);
         if (!CI->isNoopCast(DL))
       if (isa<IntToPtrInst>(V) || isa<PtrToIntInst>(V)) {
         auto *CI = dyn_cast<CastInst>(V);
         if (!CI->isNoopCast(DL))
-          return nullptr;
+          return false;
 
         if (Explored.count(CI->getOperand(0)) == 0)
           WorkList.push_back(CI->getOperand(0));
 
         if (Explored.count(CI->getOperand(0)) == 0)
           WorkList.push_back(CI->getOperand(0));
@@ -647,7 +647,7 @@ static bool canRewriteGEPAsOffset(Value *Start, Value *Base,
         // the original pointer type. We could handle more cases in the
         // future.
         if (GEP->getNumIndices() != 1 || !GEP->isInBounds())
         // the original pointer type. We could handle more cases in the
         // future.
         if (GEP->getNumIndices() != 1 || !GEP->isInBounds())
-          return nullptr;
+          return false;
 
         if (Explored.count(GEP->getOperand(0)) == 0)
           WorkList.push_back(GEP->getOperand(0));
 
         if (Explored.count(GEP->getOperand(0)) == 0)
           WorkList.push_back(GEP->getOperand(0));