From: Chris Lattner Date: Thu, 1 Nov 2001 05:58:42 +0000 (+0000) Subject: Implement new simpler constructors for if you don't have a index list X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=35d64564c81809ebddedb762e07eb455b9d2a5d1;p=oota-llvm.git 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 --- diff --git a/lib/VMCore/iMemory.cpp b/lib/VMCore/iMemory.cpp index eefeeefdc17..cc24ca14412 100644 --- a/lib/VMCore/iMemory.cpp +++ b/lib/VMCore/iMemory.cpp @@ -60,6 +60,13 @@ LoadInst::LoadInst(Value *Ptr, const vector &Idx, } +LoadInst::LoadInst(Value *Ptr, const string &Name = "") + : MemAccessInst(cast(Ptr->getType())->getValueType(), + Load, vector(), Name) { + Operands.reserve(1); + Operands.push_back(Use(Ptr, this)); +} + //===----------------------------------------------------------------------===// // StoreInst Implementation @@ -78,6 +85,14 @@ StoreInst::StoreInst(Value *Val, Value *Ptr, const vector &Idx, Operands.push_back(Use(Idx[i], this)); } +StoreInst::StoreInst(Value *Val, Value *Ptr, const string &Name = "") + : MemAccessInst(Type::VoidTy, Store, vector(), Name) { + + Operands.reserve(2); + Operands.push_back(Use(Val, this)); + Operands.push_back(Use(Ptr, this)); +} + //===----------------------------------------------------------------------===// // GetElementPtrInst Implementation