diff options
author | Victor Hernandez <vhernandez@apple.com> | 2009-10-17 01:18:07 +0000 |
---|---|---|
committer | Victor Hernandez <vhernandez@apple.com> | 2009-10-17 01:18:07 +0000 |
commit | a276c603b82a11b0bf0b59f0517a69e4b63adeab (patch) | |
tree | 0bf9c9f1be6d75c1fd4a5811844e196eec7636c9 /include/llvm/Support | |
parent | 3bdd8de2806e47f34369c1e6ce6e6b44a135bd29 (diff) |
Remove MallocInst from LLVM Instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84299 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support')
-rw-r--r-- | include/llvm/Support/IRBuilder.h | 4 | ||||
-rw-r--r-- | include/llvm/Support/InstVisitor.h | 13 |
2 files changed, 6 insertions, 11 deletions
diff --git a/include/llvm/Support/IRBuilder.h b/include/llvm/Support/IRBuilder.h index 1f659787eb..f4d1101cdf 100644 --- a/include/llvm/Support/IRBuilder.h +++ b/include/llvm/Support/IRBuilder.h @@ -429,10 +429,6 @@ public: // Instruction creation methods: Memory Instructions //===--------------------------------------------------------------------===// - MallocInst *CreateMalloc(const Type *Ty, Value *ArraySize = 0, - const Twine &Name = "") { - return Insert(new MallocInst(Ty, ArraySize), Name); - } AllocaInst *CreateAlloca(const Type *Ty, Value *ArraySize = 0, const Twine &Name = "") { return Insert(new AllocaInst(Ty, ArraySize), Name); diff --git a/include/llvm/Support/InstVisitor.h b/include/llvm/Support/InstVisitor.h index 5d7c2f72ba..440657cfef 100644 --- a/include/llvm/Support/InstVisitor.h +++ b/include/llvm/Support/InstVisitor.h @@ -46,17 +46,17 @@ namespace llvm { /// /// Declare the class. Note that we derive from InstVisitor instantiated /// /// with _our new subclasses_ type. /// /// -/// struct CountMallocVisitor : public InstVisitor<CountMallocVisitor> { +/// struct CountAllocaVisitor : public InstVisitor<CountAllocaVisitor> { /// unsigned Count; -/// CountMallocVisitor() : Count(0) {} +/// CountAllocaVisitor() : Count(0) {} /// -/// void visitMallocInst(MallocInst &MI) { ++Count; } +/// void visitAllocaInst(AllocaInst &AI) { ++Count; } /// }; /// /// And this class would be used like this: -/// CountMallocVistor CMV; -/// CMV.visit(function); -/// NumMallocs = CMV.Count; +/// CountAllocaVisitor CAV; +/// CAV.visit(function); +/// NumAllocas = CAV.Count; /// /// The defined has 'visit' methods for Instruction, and also for BasicBlock, /// Function, and Module, which recursively process all contained instructions. @@ -165,7 +165,6 @@ public: RetTy visitUnreachableInst(UnreachableInst &I) { DELEGATE(TerminatorInst);} RetTy visitICmpInst(ICmpInst &I) { DELEGATE(CmpInst);} RetTy visitFCmpInst(FCmpInst &I) { DELEGATE(CmpInst);} - RetTy visitMallocInst(MallocInst &I) { DELEGATE(AllocationInst);} RetTy visitAllocaInst(AllocaInst &I) { DELEGATE(AllocationInst);} RetTy visitFreeInst(FreeInst &I) { DELEGATE(Instruction); } RetTy visitLoadInst(LoadInst &I) { DELEGATE(Instruction); } |