Skip to content

Commit e2d9c62

Browse files
committed
OpenCL C 3.0 patch update: incorrect preprocessor directives in header
1 parent 96e49dc commit e2d9c62

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

patches/clang/0001-OpenCL-3.0-support.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 6dacab1f93b0841d698e3153764e2cfa252979ff Mon Sep 17 00:00:00 2001
1+
From 911aba1f4a95f914994957a769c938eac04555ca Mon Sep 17 00:00:00 2001
22
From: Anton Zabaznov <[email protected]>
33
Date: Tue, 22 Sep 2020 19:03:50 +0300
4-
Subject: [PATCH] OpenCL 3.0 support
4+
Subject: [PATCH 1/2] OpenCL 3.0 support
55

66
---
77
clang/include/clang/Basic/Builtins.def | 65 +-
@@ -935,7 +935,7 @@ index 430e07d36f6..2cc688ccc3d 100644
935935

936936
#endif // defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
937937
diff --git a/clang/lib/Headers/opencl-c.h b/clang/lib/Headers/opencl-c.h
938-
index 06c5ab6a72f..c402a72e801 100644
938+
index 06c5ab6a72f..a2327e3cb8a 100644
939939
--- a/clang/lib/Headers/opencl-c.h
940940
+++ b/clang/lib/Headers/opencl-c.h
941941
@@ -35,7 +35,6 @@
@@ -3527,7 +3527,7 @@ index 06c5ab6a72f..c402a72e801 100644
35273527

35283528
// atomic_fetch()
35293529
-
3530-
+#ifdef defined(__opencl_c_atomic_scope_device) && \
3530+
+#if defined(__opencl_c_atomic_scope_device) && \
35313531
+ defined(__opencl_c_atomic_order_seq_cst)
35323532
+#ifdef __opencl_c_generic_address_space
35333533
int __ovld atomic_fetch_add(volatile atomic_int *object, int operand);
@@ -3703,7 +3703,7 @@ index 06c5ab6a72f..c402a72e801 100644
37033703
+ // defined(cl_khr_int64_extended_atomics)
37043704
+#endif // __opencl_c_generic_address_space
37053705
+
3706-
+#ifdef(__OPENCL_C_VERSION__ >= CL_VERSION_3_0)
3706+
+#if(__OPENCL_C_VERSION__ >= CL_VERSION_3_0)
37073707
+int __ovld atomic_fetch_add(volatile atomic_int __global *object, int operand);
37083708
+uint __ovld atomic_fetch_add(volatile atomic_uint __local *object,
37093709
+ uint operand);

0 commit comments

Comments
 (0)