From 35d64564c81809ebddedb762e07eb455b9d2a5d1 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 1 Nov 2001 05:58:42 +0000 Subject: [PATCH] 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 --- lib/VMCore/iMemory.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 -- 2.34.1