From: Silviu Baranga Date: Thu, 7 Jan 2016 15:09:22 +0000 (+0000) Subject: Fix build after r257064: we should be returning false, not nullptr X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=909768e5bc16f08b9e8905d3d9fb3bf5489a1829;hp=0a765136e66c72541f2e7d29fb1ae5591b38d682 Fix build after r257064: we should be returning false, not nullptr git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257067 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/InstCombine/InstCombineCompares.cpp b/lib/Transforms/InstCombine/InstCombineCompares.cpp index 64d55e51f65..09c8d77c538 100644 --- a/lib/Transforms/InstCombine/InstCombineCompares.cpp +++ b/lib/Transforms/InstCombine/InstCombineCompares.cpp @@ -636,7 +636,7 @@ static bool canRewriteGEPAsOffset(Value *Start, Value *Base, if (isa(V) || isa(V)) { auto *CI = dyn_cast(V); if (!CI->isNoopCast(DL)) - return nullptr; + return false; 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()) - return nullptr; + return false; if (Explored.count(GEP->getOperand(0)) == 0) WorkList.push_back(GEP->getOperand(0));