Add placeholder __libcpp_relaxed_store() for when atomic builtins are not available.

Summary:
In rL241532, atomic_support.h was added, which provides handling of
atomic operations for libc++.  When atomic builtins are not available,
it emits a warning about being unsupported, but it still provides a
number of stubs for the required functions.

However, it misses a stub for `__libcpp_relaxed_store()`.  Add it, by
using the same implementation as for `__libcpp_atomic_store()`.

(Note that I encountered this on arm-freebsd, which still defaults to
armv4, and does not have the runtime libcalls to support atomic
builtins.  For now, I have simply disabled using them.)

Reviewers: mclow.lists, EricWF

Subscribers: theraven, cfe-commits, jroelofs, majnemer, aemerson

Differential Revision: http://reviews.llvm.org/D13051

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@248313 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dimitry Andric 2015-09-22 18:55:37 +00:00
parent 514c831504
commit da3ca86451

View File

@ -103,6 +103,13 @@ void __libcpp_atomic_store(_ValueType* __dest, _FromType __val,
*__dest = __val;
}
template <class _ValueType, class _FromType>
inline _LIBCPP_INLINE_VISIBILITY
void __libcpp_relaxed_store(_ValueType* __dest, _FromType __val)
{
*__dest = __val;
}
template <class _ValueType>
inline _LIBCPP_INLINE_VISIBILITY
_ValueType __libcpp_atomic_load(_ValueType const* __val,