diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-31 20:28:14 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-31 20:28:14 +0000 |
commit | 5a1acd99126d8b867aef4a785aae635fb98b6c08 (patch) | |
tree | 4a7049e4b83ac61c1b374bbb168e359ff4d5268a /llvm/lib/Transforms/Utils/LowerAllocations.cpp | |
parent | ef3ef7f645cd4f070e426ed781f0104bcffb45d7 (diff) | |
download | bcm5719-llvm-5a1acd99126d8b867aef4a785aae635fb98b6c08.tar.gz bcm5719-llvm-5a1acd99126d8b867aef4a785aae635fb98b6c08.zip |
Move a few more APIs back to 2.5 forms. The only remaining ones left to change back are
metadata related, which I'm waiting on to avoid conflicting with Devang.
llvm-svn: 77721
Diffstat (limited to 'llvm/lib/Transforms/Utils/LowerAllocations.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LowerAllocations.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/LowerAllocations.cpp b/llvm/lib/Transforms/Utils/LowerAllocations.cpp index 305897c8ffb..ce7b04a4978 100644 --- a/llvm/lib/Transforms/Utils/LowerAllocations.cpp +++ b/llvm/lib/Transforms/Utils/LowerAllocations.cpp @@ -103,8 +103,6 @@ bool LowerAllocations::runOnBasicBlock(BasicBlock &BB) { bool Changed = false; assert(MallocFunc && FreeFunc && "Pass not initialized!"); - LLVMContext &Context = BB.getContext(); - BasicBlock::InstListType &BBIL = BB.getInstList(); const TargetData &TD = getAnalysis<TargetData>(); @@ -156,7 +154,7 @@ bool LowerAllocations::runOnBasicBlock(BasicBlock &BB) { if (MCall->getType() != Type::VoidTy) MCast = new BitCastInst(MCall, MI->getType(), "", I); else - MCast = Context.getNullValue(MI->getType()); + MCast = Constant::getNullValue(MI->getType()); // Replace all uses of the old malloc inst with the cast inst MI->replaceAllUsesWith(MCast); |