diff options
author | Victor Hernandez <vhernandez@apple.com> | 2009-10-26 23:43:48 +0000 |
---|---|---|
committer | Victor Hernandez <vhernandez@apple.com> | 2009-10-26 23:43:48 +0000 |
commit | de5ad42aa16287671b8e39173f8e0d39b8f35a73 (patch) | |
tree | 4b5bb9c47e42d2dc31877f0a8d5786927266b0c2 /llvm/lib/VMCore/Instructions.cpp | |
parent | 7a484dd6a9a900c1c25794a0d555e40e417f693b (diff) | |
download | bcm5719-llvm-de5ad42aa16287671b8e39173f8e0d39b8f35a73.tar.gz bcm5719-llvm-de5ad42aa16287671b8e39173f8e0d39b8f35a73.zip |
Remove FreeInst.
Remove LowerAllocations pass.
Update some more passes to treate free calls just like they were treating FreeInst.
llvm-svn: 85176
Diffstat (limited to 'llvm/lib/VMCore/Instructions.cpp')
-rw-r--r-- | llvm/lib/VMCore/Instructions.cpp | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/llvm/lib/VMCore/Instructions.cpp b/llvm/lib/VMCore/Instructions.cpp index c926547ad83..02d5af0120e 100644 --- a/llvm/lib/VMCore/Instructions.cpp +++ b/llvm/lib/VMCore/Instructions.cpp @@ -985,28 +985,6 @@ bool AllocaInst::isStaticAlloca() const { } //===----------------------------------------------------------------------===// -// FreeInst Implementation -//===----------------------------------------------------------------------===// - -void FreeInst::AssertOK() { - assert(isa<PointerType>(getOperand(0)->getType()) && - "Can not free something of nonpointer type!"); -} - -FreeInst::FreeInst(Value *Ptr, Instruction *InsertBefore) - : UnaryInstruction(Type::getVoidTy(Ptr->getContext()), - Free, Ptr, InsertBefore) { - AssertOK(); -} - -FreeInst::FreeInst(Value *Ptr, BasicBlock *InsertAtEnd) - : UnaryInstruction(Type::getVoidTy(Ptr->getContext()), - Free, Ptr, InsertAtEnd) { - AssertOK(); -} - - -//===----------------------------------------------------------------------===// // LoadInst Implementation //===----------------------------------------------------------------------===// @@ -3181,16 +3159,6 @@ AllocaInst *AllocaInst::clone() const { return New; } -FreeInst *FreeInst::clone() const { - FreeInst *New = new FreeInst(getOperand(0)); - New->SubclassOptionalData = SubclassOptionalData; - if (hasMetadata()) { - LLVMContext &Context = getContext(); - Context.pImpl->TheMetadata.ValueIsCloned(this, New); - } - return New; -} - LoadInst *LoadInst::clone() const { LoadInst *New = new LoadInst(getOperand(0), Twine(), isVolatile(), |