diff options
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
| -rw-r--r-- | src/rustllvm/RustWrapper.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp index ecf9146a1d0..4ebe49512d7 100644 --- a/src/rustllvm/RustWrapper.cpp +++ b/src/rustllvm/RustWrapper.cpp @@ -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, |
