Obey [atomics.types.operations.req]/21 for GCC.
authorDan Albert <danalbert@google.com>
Tue, 6 Jan 2015 18:39:37 +0000 (18:39 +0000)
committerDan Albert <danalbert@google.com>
Tue, 6 Jan 2015 18:39:37 +0000 (18:39 +0000)
commit872bad5ab72ec9e5b5bab1bff98285b1c36bbe58
treed1ee51fca9ae2eb19e28f17851791e5c421e7bdf
parentd9c605ddae86b6e4b2138d7eec7b301698e3dfcb
Obey [atomics.types.operations.req]/21 for GCC.

Summary:
Excerpt from [atomics.types.operations.req]/21:

> When only one memory_order argument is supplied, the value of
> success is order, and the value of failure is order except that a
> value of memory_order_acq_rel shall be replaced by the value
> memory_order_acquire and a value of memory_order_release shall be
> replaced by the value memory_order_relaxed.

Clean up some copy pasta while I'm here (someone added a return
statement to a void function).

Reviewers: EricWF, jroelofs, mclow.lists

Reviewed By: mclow.lists

Subscribers: cfe-commits

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

llvm-svn: 225280
libcxx/include/atomic
libcxx/test/atomics/atomics.general/replace_failure_order.pass.cpp [new file with mode: 0644]