Auto merge of #30969 - Amanieu:extended_atomic_cmpxchg, r=alexcrichton

This is an implementation of rust-lang/rfcs#1443.
This commit is contained in:
bors
2016-02-22 19:10:13 +00:00
10 changed files with 577 additions and 49 deletions

View File

@@ -191,11 +191,15 @@ extern "C" LLVMValueRef LLVMBuildAtomicCmpXchg(LLVMBuilderRef B,
LLVMValueRef old,
LLVMValueRef source,
AtomicOrdering order,
AtomicOrdering failure_order) {
return wrap(unwrap(B)->CreateAtomicCmpXchg(unwrap(target), unwrap(old),
unwrap(source), order,
failure_order
));
AtomicOrdering failure_order,
LLVMBool weak) {
AtomicCmpXchgInst* acxi = unwrap(B)->CreateAtomicCmpXchg(unwrap(target),
unwrap(old),
unwrap(source),
order,
failure_order);
acxi->setWeak(weak);
return wrap(acxi);
}
extern "C" LLVMValueRef LLVMBuildAtomicFence(LLVMBuilderRef B,
AtomicOrdering order,