[llvm] r257067 - Fix build after r257064: we should be returning false, not nullptr
Silviu Baranga via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 7 07:09:22 PST 2016
Author: sbaranga
Date: Thu Jan 7 09:09:22 2016
New Revision: 257067
URL: http://llvm.org/viewvc/llvm-project?rev=257067&view=rev
Log:
Fix build after r257064: we should be returning false, not nullptr
Modified:
llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp?rev=257067&r1=257066&r2=257067&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp Thu Jan 7 09:09:22 2016
@@ -636,7 +636,7 @@ static bool canRewriteGEPAsOffset(Value
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));
@@ -647,7 +647,7 @@ static bool canRewriteGEPAsOffset(Value
// 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));
More information about the llvm-commits
mailing list