summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/LowerAllocations.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-29 18:55:55 +0000
committerOwen Anderson <resistor@mac.com>2009-07-29 18:55:55 +0000
commit487375e9a2c9bd64869aab778ef26770ed4bef67 (patch)
treec6360f5a96c7c7ced626d13ed8c98de3f99391ec /llvm/lib/Transforms/Utils/LowerAllocations.cpp
parentade90fd1ba0c99780076c11ff0a23c2aa5319228 (diff)
downloadbcm5719-llvm-487375e9a2c9bd64869aab778ef26770ed4bef67.tar.gz
bcm5719-llvm-487375e9a2c9bd64869aab778ef26770ed4bef67.zip
Move ConstantExpr to 2.5 API.
llvm-svn: 77494
Diffstat (limited to 'llvm/lib/Transforms/Utils/LowerAllocations.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LowerAllocations.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Utils/LowerAllocations.cpp b/llvm/lib/Transforms/Utils/LowerAllocations.cpp
index 68108fa0f2d..522166d6f2d 100644
--- a/llvm/lib/Transforms/Utils/LowerAllocations.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud