kzhuravl added inline comments.
Comment at: cfe/trunk/lib/Headers/opencl-c.h:13638-13640
-#ifndef ATOMIC_VAR_INIT
-#define ATOMIC_VAR_INIT(x) (x)
-#endif //ATOMIC_VAR_INIT
svenvh wrote:
> yaxunl wrote:
> > kzhuravl wrote:
> > > Any reason this piece of code got c
svenvh marked 3 inline comments as done.
svenvh added inline comments.
Comment at: cfe/trunk/lib/Headers/opencl-c.h:13638-13640
-#ifndef ATOMIC_VAR_INIT
-#define ATOMIC_VAR_INIT(x) (x)
-#endif //ATOMIC_VAR_INIT
yaxunl wrote:
> kzhuravl wrote:
> > Any reason this
yaxunl added inline comments.
Comment at: cfe/trunk/lib/Headers/opencl-c.h:13638
#if __OPENCL_C_VERSION__ >= CL_VERSION_2_0
-#ifndef ATOMIC_VAR_INIT
-#define ATOMIC_VAR_INIT(x) (x)
kzhuravl wrote:
> Any reason this piece of code got completely removed?
Removing
kzhuravl added subscribers: b-sumner, kzhuravl.
kzhuravl added a comment.
+ @b-sumner
Comment at: cfe/trunk/lib/Headers/opencl-c.h:13638-13640
-#ifndef ATOMIC_VAR_INIT
-#define ATOMIC_VAR_INIT(x) (x)
-#endif //ATOMIC_VAR_INIT
Any reason this piece of code got c
This revision was automatically updated to reflect the committed changes.
Closed by commit rL363794: [OpenCL] Split type and macro definitions into
opencl-c-base.h (authored by svenvh, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Changed prior to commit:
asavonic accepted this revision.
asavonic added a comment.
This revision is now accepted and ready to land.
Thanks. LGTM.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63256/new/
https://reviews.llvm.org/D63256
___
cfe-commits mailing list
svenvh updated this revision to Diff 204796.
svenvh added a comment.
Change `IncludeDefaultHeader` and `DeclareOpenCLBuiltins` logic as per
@asavonic's comments. Also extend
`test/SemaOpenCL/fdeclare-opencl-builtins.cl` to test the interplay of both
options.
CHANGES SINCE LAST ACTION
https
asavonic added a comment.
LGTM, except for the `IncludeDefaultHeader` and `DeclareOpenCLBuiltins` logic.
Comment at: lib/Frontend/CompilerInvocation.cpp:2194
}
+// Include base header file for builtin types and constants.
+if (Opts.DeclareOpenCLBuiltins) {
svenvh created this revision.
svenvh added a reviewer: asavonic.
Herald added subscribers: cfe-commits, jfb, yaxunl, mgorny.
Herald added a project: clang.
Using the -fdeclare-opencl-builtins option will require a way to
predefine types and macros such as `int4`, `CLK_GLOBAL_MEM_FENCE`,
etc. Move