[libc++] Refactoring __sync_* builtins; NFC

Summary: Wrap __sync_* builtins with __libcpp_ functions to facility future customizations as atomic operations are unavailable on some targets.

Reviewers: danalbert, EricWF, jroelofs

Subscribers: joerg, llvm-commits

Differential Revision: https://reviews.llvm.org/D34918

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@307591 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Weiming Zhao
2017-07-10 21:02:54 +00:00
parent 6bfa7316ad
commit f7ed02c939
5 changed files with 46 additions and 12 deletions

View File

@@ -667,7 +667,7 @@ locale::id::__get()
void
locale::id::__init()
{
__id_ = __sync_add_and_fetch(&__next_id, 1);
__id_ = __libcpp_sync_add_and_fetch(&__next_id, 1);
}
// template <> class collate_byname<char>