From 998c10d6b64f9a37d4cab33e09b9dfd551c76b92 Mon Sep 17 00:00:00 2001 From: Peter Marheine Date: Sat, 14 Feb 2015 23:48:10 -0700 Subject: Add singlethreaded fence intrinsics. These new intrinsics are comparable to `atomic_signal_fence` in C++, ensuring the compiler will not reorder memory accesses across the barrier, nor will it emit any machine instructions for it. Closes #24118, implementing RFC 888. --- src/rustllvm/RustWrapper.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/rustllvm/RustWrapper.cpp') diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp index fe0a7b454c1..375c5fc746c 100644 --- a/src/rustllvm/RustWrapper.cpp +++ b/src/rustllvm/RustWrapper.cpp @@ -189,8 +189,10 @@ extern "C" LLVMValueRef LLVMBuildAtomicCmpXchg(LLVMBuilderRef B, failure_order )); } -extern "C" LLVMValueRef LLVMBuildAtomicFence(LLVMBuilderRef B, AtomicOrdering order) { - return wrap(unwrap(B)->CreateFence(order)); +extern "C" LLVMValueRef LLVMBuildAtomicFence(LLVMBuilderRef B, + AtomicOrdering order, + SynchronizationScope scope) { + return wrap(unwrap(B)->CreateFence(order, scope)); } extern "C" void LLVMSetDebug(int Enabled) { -- cgit 1.4.1-3-g733a5