aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-05-10 04:38:35 +0000
committerChris Lattner <sabre@nondot.org>2006-05-10 04:38:35 +0000
commitb77780e11ec72837da2637cf9a7643cd51770d63 (patch)
tree340b7dbf212369c073b78e1025755f9e032f5bf6
parente46749cce0088a0aaa03bcb5786e94c6c11bced5 (diff)
Add alloca/malloc ctors that don't take array sizes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28211 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Instructions.h29
1 files changed, 21 insertions, 8 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h
index 1c18e9a618..bedb6454b6 100644
--- a/include/llvm/Instructions.h
+++ b/include/llvm/Instructions.h
@@ -104,13 +104,20 @@ public:
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 @@ public:
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;