diff options
author | Sven van Haastregt <sven.vanhaastregt@arm.com> | 2019-07-19 09:11:48 +0000 |
---|---|---|
committer | Sven van Haastregt <sven.vanhaastregt@arm.com> | 2019-07-19 09:11:48 +0000 |
commit | e9e59ad79ffdbb319db43144b68265170ee41c49 (patch) | |
tree | b3f2892d324bac3fd46a32413a270da9222af9d5 /clang/lib/Headers/opencl-c-base.h | |
parent | f3ae501d36eb742a82041707d1fe2aba2613e5fc (diff) | |
download | bcm5719-llvm-e9e59ad79ffdbb319db43144b68265170ee41c49.tar.gz bcm5719-llvm-e9e59ad79ffdbb319db43144b68265170ee41c49.zip |
[OpenCL] Define CLK_NULL_EVENT without cast
Defining CLK_NULL_EVENT with a `(void*)` cast has the (unintended?)
side-effect that the address space will be fixed (as generic in OpenCL
2.0 mode). The consequence is that any target specific address space
for the clk_event_t type will not be applied.
It is not clear why the void pointer cast was needed in the first
place, and it seems we can do without it.
Differential Revision: https://reviews.llvm.org/D63876
llvm-svn: 366546
Diffstat (limited to 'clang/lib/Headers/opencl-c-base.h')
-rw-r--r-- | clang/lib/Headers/opencl-c-base.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Headers/opencl-c-base.h b/clang/lib/Headers/opencl-c-base.h index a82954ddd32..4e86168b4f3 100644 --- a/clang/lib/Headers/opencl-c-base.h +++ b/clang/lib/Headers/opencl-c-base.h @@ -413,7 +413,7 @@ typedef enum memory_order #define CLK_OUT_OF_RESOURCES -5 #define CLK_NULL_QUEUE 0 -#define CLK_NULL_EVENT (__builtin_astype(((void*)(__SIZE_MAX__)), clk_event_t)) +#define CLK_NULL_EVENT (__builtin_astype(((__SIZE_MAX__)), clk_event_t)) // execution model related definitions #define CLK_ENQUEUE_FLAGS_NO_WAIT 0x0 |