[llvm-commits] CVS: llvm/include/llvm/Instructions.h

Chris Lattner lattner at cs.uiuc.edu
Tue May 9 21:38:48 PDT 2006



Changes in directory llvm/include/llvm:

Instructions.h updated: 1.34 -> 1.35
---
Log message:

Add alloca/malloc ctors that don't take array sizes.


---
Diffs of the changes:  (+21 -8)

 Instructions.h |   29 +++++++++++++++++++++--------
 1 files changed, 21 insertions(+), 8 deletions(-)


Index: llvm/include/llvm/Instructions.h
diff -u llvm/include/llvm/Instructions.h:1.34 llvm/include/llvm/Instructions.h:1.35
--- llvm/include/llvm/Instructions.h:1.34	Fri Apr 14 17:20:07 2006
+++ llvm/include/llvm/Instructions.h	Tue May  9 23:38:35 2006
@@ -104,13 +104,20 @@
   MallocInst(const Type *Ty, Value *ArraySize, const std::string &Name,
              BasicBlock *InsertAtEnd)
     : AllocationInst(Ty, ArraySize, Malloc, 0, Name, InsertAtEnd) {}
+  
+  explicit MallocInst(const Type *Ty, const std::string &Name,
+                      Instruction *InsertBefore = 0)
+    : AllocationInst(Ty, 0, Malloc, 0, Name, InsertBefore) {}
+  MallocInst(const Type *Ty, const std::string &Name, BasicBlock *InsertAtEnd)
+    : AllocationInst(Ty, 0, Malloc, 0, Name, InsertAtEnd) {}
+  
   MallocInst(const Type *Ty, Value *ArraySize, unsigned Align, 
              const std::string &Name, BasicBlock *InsertAtEnd)
-  : AllocationInst(Ty, ArraySize, Malloc, Align, Name, InsertAtEnd) {}
-  explicit MallocInst(const Type *Ty, Value *ArraySize, unsigned Align,
+    : AllocationInst(Ty, ArraySize, Malloc, Align, Name, InsertAtEnd) {}
+  MallocInst(const Type *Ty, Value *ArraySize, unsigned Align,
                       const std::string &Name = "",
                       Instruction *InsertBefore = 0)
-  : AllocationInst(Ty, ArraySize, Malloc, Align, Name, InsertBefore) {}
+    : AllocationInst(Ty, ArraySize, Malloc, Align, Name, InsertBefore) {}
   
   virtual MallocInst *clone() const;
 
@@ -141,13 +148,19 @@
   AllocaInst(const Type *Ty, Value *ArraySize, const std::string &Name,
              BasicBlock *InsertAtEnd)
     : AllocationInst(Ty, ArraySize, Alloca, 0, Name, InsertAtEnd) {}
+
+  AllocaInst(const Type *Ty, const std::string &Name,
+             Instruction *InsertBefore = 0)
+    : AllocationInst(Ty, 0, Alloca, 0, Name, InsertBefore) {}
+  AllocaInst(const Type *Ty, const std::string &Name, BasicBlock *InsertAtEnd)
+    : AllocationInst(Ty, 0, Alloca, 0, Name, InsertAtEnd) {}
+  
+  AllocaInst(const Type *Ty, Value *ArraySize, unsigned Align,
+             const std::string &Name = "", Instruction *InsertBefore = 0)
+    : AllocationInst(Ty, ArraySize, Alloca, Align, Name, InsertBefore) {}
   AllocaInst(const Type *Ty, Value *ArraySize, unsigned Align,
              const std::string &Name, BasicBlock *InsertAtEnd)
-  : AllocationInst(Ty, ArraySize, Alloca, Align, Name, InsertAtEnd) {}
-  explicit AllocaInst(const Type *Ty, Value *ArraySize, unsigned Align,
-                      const std::string &Name = "",
-                      Instruction *InsertBefore = 0)
-  : AllocationInst(Ty, ArraySize, Alloca, Align, Name, InsertBefore) {}
+    : AllocationInst(Ty, ArraySize, Alloca, Align, Name, InsertAtEnd) {}
   
   virtual AllocaInst *clone() const;
 






More information about the llvm-commits mailing list