diff options
Diffstat (limited to 'lib/Transforms/Utils/LowerAllocations.cpp')
-rw-r--r-- | lib/Transforms/Utils/LowerAllocations.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Utils/LowerAllocations.cpp b/lib/Transforms/Utils/LowerAllocations.cpp index 0213daf38c..8acaeed26b 100644 --- a/lib/Transforms/Utils/LowerAllocations.cpp +++ b/lib/Transforms/Utils/LowerAllocations.cpp @@ -121,7 +121,7 @@ bool LowerAllocations::runOnBasicBlock(BasicBlock &BB) { if (MI->isArrayAllocation()) { if (isa<ConstantInt>(MallocArg) && - cast<ConstantInt>(MallocArg)->getZExtValue() == 1) { + cast<ConstantInt>(MallocArg)->isOne()) { MallocArg = MI->getOperand(0); // Operand * 1 = Operand } else if (Constant *CO = dyn_cast<Constant>(MI->getOperand(0))) { CO = ConstantExpr::getIntegerCast(CO, IntPtrTy, false /*ZExt*/); |