diff --git a/include/boost/atomic/detail/ops_msvc_common.hpp b/include/boost/atomic/detail/ops_msvc_common.hpp index 53628f3..a037f3f 100644 --- a/include/boost/atomic/detail/ops_msvc_common.hpp +++ b/include/boost/atomic/detail/ops_msvc_common.hpp @@ -5,7 +5,7 @@ * * Copyright (c) 2009 Helge Bahmann * Copyright (c) 2012 Tim Blechmann - * Copyright (c) 2014 Andrey Semashev + * Copyright (c) 2014, 2019 Andrey Semashev */ /*! * \file atomic/detail/ops_msvc_common.hpp @@ -25,6 +25,8 @@ // Define compiler barriers #if defined(__INTEL_COMPILER) #define BOOST_ATOMIC_DETAIL_COMPILER_BARRIER() __memory_barrier() +#elif defined(__clang__) +#define BOOST_ATOMIC_DETAIL_COMPILER_BARRIER() __atomic_signal_fence(__ATOMIC_SEQ_CST); #elif defined(_MSC_VER) && !defined(_WIN32_WCE) extern "C" void _ReadWriteBarrier(void); #pragma intrinsic(_ReadWriteBarrier)