diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-29 18:55:55 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-29 18:55:55 +0000 |
commit | baf3c404409d5e47b13984a7f95bfbd6d1f2e79e (patch) | |
tree | c06618ee06936e7f5a1dc3c30b313ee49d5eb09b /lib/Transforms/Utils/LowerAllocations.cpp | |
parent | 26ef510d5d20b89c637d13e2d9169c0458de775c (diff) |
Move ConstantExpr to 2.5 API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77494 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/LowerAllocations.cpp')
-rw-r--r-- | lib/Transforms/Utils/LowerAllocations.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Transforms/Utils/LowerAllocations.cpp b/lib/Transforms/Utils/LowerAllocations.cpp index 68108fa0f2..522166d6f2 100644 --- a/lib/Transforms/Utils/LowerAllocations.cpp +++ b/lib/Transforms/Utils/LowerAllocations.cpp @@ -121,9 +121,9 @@ bool LowerAllocations::runOnBasicBlock(BasicBlock &BB) { MallocArg = ConstantInt::get(Type::Int64Ty, TD.getTypeAllocSize(AllocTy)); else - MallocArg = Context.getConstantExprSizeOf(AllocTy); + MallocArg = ConstantExpr::getSizeOf(AllocTy); MallocArg = - Context.getConstantExprTruncOrBitCast(cast<Constant>(MallocArg), + ConstantExpr::getTruncOrBitCast(cast<Constant>(MallocArg), IntPtrTy); if (MI->isArrayAllocation()) { @@ -132,8 +132,8 @@ bool LowerAllocations::runOnBasicBlock(BasicBlock &BB) { MallocArg = MI->getOperand(0); // Operand * 1 = Operand } else if (Constant *CO = dyn_cast<Constant>(MI->getOperand(0))) { CO = - Context.getConstantExprIntegerCast(CO, IntPtrTy, false /*ZExt*/); - MallocArg = Context.getConstantExprMul(CO, + ConstantExpr::getIntegerCast(CO, IntPtrTy, false /*ZExt*/); + MallocArg = ConstantExpr::getMul(CO, cast<Constant>(MallocArg)); } else { Value *Scale = MI->getOperand(0); |