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
This commit is contained in:
Chris Lattner 2001-11-01 05:58:42 +00:00
parent dedee7bf15
commit 35d64564c8

View File

@ -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