diff options
Diffstat (limited to 'llvm/lib/IR/Instructions.cpp')
-rw-r--r-- | llvm/lib/IR/Instructions.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp index 2ea9c05..bc228a5 100644 --- a/llvm/lib/IR/Instructions.cpp +++ b/llvm/lib/IR/Instructions.cpp @@ -1462,6 +1462,9 @@ StoreInst::StoreInst(Value *val, Value *addr, Instruction *InsertBefore) StoreInst::StoreInst(Value *val, Value *addr, BasicBlock *InsertAtEnd) : StoreInst(val, addr, /*isVolatile=*/false, InsertAtEnd) {} +StoreInst::StoreInst(Value *val, Value *addr, BasicBlock::iterator InsertBefore) + : StoreInst(val, addr, /*isVolatile=*/false, InsertBefore) {} + StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile, Instruction *InsertBefore) : StoreInst(val, addr, isVolatile, @@ -1474,6 +1477,12 @@ StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile, computeLoadStoreDefaultAlign(val->getType(), InsertAtEnd), InsertAtEnd) {} +StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile, + BasicBlock::iterator InsertBefore) + : StoreInst(val, addr, isVolatile, + computeLoadStoreDefaultAlign(val->getType(), &*InsertBefore), + InsertBefore) {} + StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile, Align Align, Instruction *InsertBefore) : StoreInst(val, addr, isVolatile, Align, AtomicOrdering::NotAtomic, @@ -1485,6 +1494,11 @@ StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile, Align Align, SyncScope::System, InsertAtEnd) {} StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile, Align Align, + BasicBlock::iterator InsertBefore) + : StoreInst(val, addr, isVolatile, Align, AtomicOrdering::NotAtomic, + SyncScope::System, InsertBefore) {} + +StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile, Align Align, AtomicOrdering Order, SyncScope::ID SSID, Instruction *InsertBefore) : Instruction(Type::getVoidTy(val->getContext()), Store, @@ -1512,6 +1526,20 @@ StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile, Align Align, AssertOK(); } +StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile, Align Align, + AtomicOrdering Order, SyncScope::ID SSID, + BasicBlock::iterator InsertBefore) + : Instruction(Type::getVoidTy(val->getContext()), Store, + OperandTraits<StoreInst>::op_begin(this), + OperandTraits<StoreInst>::operands(this)) { + Op<0>() = val; + Op<1>() = addr; + setVolatile(isVolatile); + setAlignment(Align); + setAtomic(Order, SSID); + insertBefore(*InsertBefore->getParent(), InsertBefore); + AssertOK(); +} //===----------------------------------------------------------------------===// // AtomicCmpXchgInst Implementation |