diff options
author | Chris Lattner <sabre@nondot.org> | 2001-11-01 05:58:42 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-11-01 05:58:42 +0000 |
commit | 35d64564c81809ebddedb762e07eb455b9d2a5d1 (patch) | |
tree | 90f7a7d10a0bfe98dde7c95d81aae03225b79231 | |
parent | dedee7bf15cb5dca3bbca20b67ff5b6a47ce4605 (diff) | |
download | external_llvm-35d64564c81809ebddedb762e07eb455b9d2a5d1.zip external_llvm-35d64564c81809ebddedb762e07eb455b9d2a5d1.tar.gz external_llvm-35d64564c81809ebddedb762e07eb455b9d2a5d1.tar.bz2 |
Implement new simpler constructors for if you don't have a index list
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1081 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/VMCore/iMemory.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/VMCore/iMemory.cpp b/lib/VMCore/iMemory.cpp index eefeeef..cc24ca1 100644 --- a/lib/VMCore/iMemory.cpp +++ b/lib/VMCore/iMemory.cpp @@ -60,6 +60,13 @@ LoadInst::LoadInst(Value *Ptr, const vector<ConstPoolVal*> &Idx, } +LoadInst::LoadInst(Value *Ptr, const string &Name = "") + : MemAccessInst(cast<PointerType>(Ptr->getType())->getValueType(), + Load, vector<ConstPoolVal*>(), Name) { + Operands.reserve(1); + Operands.push_back(Use(Ptr, this)); +} + //===----------------------------------------------------------------------===// // StoreInst Implementation @@ -78,6 +85,14 @@ StoreInst::StoreInst(Value *Val, Value *Ptr, const vector<ConstPoolVal*> &Idx, Operands.push_back(Use(Idx[i], this)); } +StoreInst::StoreInst(Value *Val, Value *Ptr, const string &Name = "") + : MemAccessInst(Type::VoidTy, Store, vector<ConstPoolVal*>(), Name) { + + Operands.reserve(2); + Operands.push_back(Use(Val, this)); + Operands.push_back(Use(Ptr, this)); +} + //===----------------------------------------------------------------------===// // GetElementPtrInst Implementation |