summaryrefslogtreecommitdiffstats
path: root/clang/lib/Headers/opencl-c-base.h
Commit message (Collapse)AuthorAgeFilesLines
* [OpenCL] Fix lang mode predefined macros for C++ mode.Anastasia Stulova2019-08-121-12/+5
| | | | | | | | | | | | | In C++ mode we should only avoid adding __OPENCL_C_VERSION__, all other predefined macros about the language mode are still valid. This change also fixes the language version check in the headers accordingly. Differential Revision: https://reviews.llvm.org/D65941 llvm-svn: 368552
* [OpenCL] Define CLK_NULL_EVENT without castSven van Haastregt2019-07-191-1/+1
| | | | | | | | | | | | | | 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
* [OpenCL] Restore ATOMIC_VAR_INITSven van Haastregt2019-06-241-1/+6
| | | | | | | | | We accidentally lost the ATOMIC_VAR_INIT and ATOMIC_FLAG_INIT macros in r363794. Also put the `memory_order` typedef back inside a `>= CL2.0` guard. llvm-svn: 364174
* [OpenCL] Split type and macro definitions into opencl-c-base.hSven van Haastregt2019-06-191-0/+573
Using the -fdeclare-opencl-builtins option will require a way to predefine types and macros such as `int4`, `CLK_GLOBAL_MEM_FENCE`, etc. Move these out of opencl-c.h into opencl-c-base.h such that the latter can be shared by -fdeclare-opencl-builtins and -finclude-default-header. This changes the behaviour of -finclude-default-header when -fdeclare-opencl-builtins is specified: instead of including the full header, it will include the header with only the base definitions. Differential revision: https://reviews.llvm.org/D63256 llvm-svn: 363794
OpenPOWER on IntegriCloud