LLVMValueRef mono_llvm_build_store (LLVMBuilderRef builder, LLVMValueRef Val, LLVMValueRef PointerVal, gboolean is_volatile, BarrierKind barrier) { StoreInst *ins = unwrap(builder)->CreateStore(unwrap(Val), unwrap(PointerVal), is_volatile); switch (barrier) { case LLVM_BARRIER_NONE: break; case LLVM_BARRIER_REL: ins->setOrdering(Release); break; case LLVM_BARRIER_SEQ: ins->setOrdering(SequentiallyConsistent); break; default: g_assert_not_reached (); break; } return wrap(ins); }
LLVMValueRef LLVM_General_BuildStore( LLVMBuilderRef b, LLVMValueRef v, LLVMValueRef p, unsigned align, LLVMBool isVolatile, LLVMAtomicOrdering atomicOrdering, LLVMSynchronizationScope synchScope, const char *name ) { StoreInst *i = unwrap(b)->CreateAlignedStore(unwrap(v), unwrap(p), align, isVolatile); i->setName(name); i->setOrdering(unwrap(atomicOrdering)); if (atomicOrdering != LLVMAtomicOrderingNotAtomic) i->setSynchScope(unwrap(synchScope)); return wrap(i); }