[PATCH] D47613: Mark __c11_atomic_load as const

JF Bastien via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 1 11:07:11 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL333776: Mark __c11_atomic_load as const (authored by jfb, committed by ).
Herald added a subscriber: llvm-commits.

Repository:
  rL LLVM

https://reviews.llvm.org/D47613

Files:
  libcxx/trunk/include/atomic


Index: libcxx/trunk/include/atomic
===================================================================
--- libcxx/trunk/include/atomic
+++ libcxx/trunk/include/atomic
@@ -698,16 +698,16 @@
 }
 
 template <typename _Tp>
-static inline _Tp __c11_atomic_load(volatile _Atomic(_Tp)* __a,
+static inline _Tp __c11_atomic_load(const volatile _Atomic(_Tp)* __a,
                                     memory_order __order) {
   _Tp __ret;
   __atomic_load(&__a->__a_value, &__ret,
                 __gcc_atomic::__to_gcc_order(__order));
   return __ret;
 }
 
 template <typename _Tp>
-static inline _Tp __c11_atomic_load(_Atomic(_Tp)* __a, memory_order __order) {
+static inline _Tp __c11_atomic_load(const _Atomic(_Tp)* __a, memory_order __order) {
   _Tp __ret;
   __atomic_load(&__a->__a_value, &__ret,
                 __gcc_atomic::__to_gcc_order(__order));


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47613.149511.patch
Type: text/x-patch
Size: 855 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180601/ddae3801/attachment.bin>


More information about the cfe-commits mailing list