Fix false -> NULL conversion from r167115 spotted by Benjamin Kramer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167117 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Hans Wennborg 2012-10-31 14:36:48 +00:00
parent b4c9d9c51f
commit 2857866138

View File

@ -3251,7 +3251,7 @@ static Constant* ConstantFold(Instruction *I,
if (CastInst *Cast = dyn_cast<CastInst>(I)) {
Constant *A = dyn_cast<Constant>(I->getOperand(0));
if (!A) A = ConstantPool.lookup(I->getOperand(0));
if (!A) return false;
if (!A) return NULL;
Constant *C = ConstantExpr::getCast(Cast->getOpcode(), A, Cast->getDestTy());
return C;