Author: Sven van Haastregt
Date: 2022-04-20T11:02:50+01:00
New Revision: e67b1b0ccf520a0168758d116e88f63160812e99

URL: 
https://github.com/llvm/llvm-project/commit/e67b1b0ccf520a0168758d116e88f63160812e99
DIFF: 
https://github.com/llvm/llvm-project/commit/e67b1b0ccf520a0168758d116e88f63160812e99.diff

LOG: [OpenCL] Add missing __opencl_c_atomic_scope_device guards

Update opencl-c.h after the specification clarification in
https://github.com/KhronosGroup/OpenCL-Docs/pull/775

Added: 
    

Modified: 
    clang/lib/Headers/opencl-c.h

Removed: 
    


################################################################################
diff  --git a/clang/lib/Headers/opencl-c.h b/clang/lib/Headers/opencl-c.h
index 7ea835ae5c2de..8d9af52481957 100644
--- a/clang/lib/Headers/opencl-c.h
+++ b/clang/lib/Headers/opencl-c.h
@@ -14376,6 +14376,7 @@ bool __ovld atomic_compare_exchange_weak(volatile 
__local atomic_ulong *, __priv
 #endif // (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 
202100)
 #endif
 
+#if defined(__opencl_c_atomic_scope_device)
 #if defined(__opencl_c_generic_address_space)
 bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_int *, int 
*, int, memory_order, memory_order);
 bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_uint *, 
uint *, uint, memory_order, memory_order);
@@ -14472,6 +14473,7 @@ bool __ovld 
atomic_compare_exchange_weak_explicit(volatile __local atomic_ulong
 bool __ovld atomic_compare_exchange_weak_explicit(volatile __local 
atomic_ulong *, __private ulong *, ulong, memory_order, memory_order);
 #endif //defined(cl_khr_int64_base_atomics) && 
defined(cl_khr_int64_extended_atomics)
 #endif // (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 
202100)
+#endif //defined(__opencl_c_atomic_scope_device)
 
 #if defined(__opencl_c_generic_address_space)
 bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_int *, int 
*, int, memory_order, memory_order, memory_scope);


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to