[PATCH] D63256: [OpenCL] Split type and macro definitions into opencl-c-base.h

2019-06-24 Thread Konstantin Zhuravlyov via Phabricator via cfe-commits
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

[PATCH] D63256: [OpenCL] Split type and macro definitions into opencl-c-base.h

2019-06-24 Thread Sven van Haastregt via Phabricator via cfe-commits
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

[PATCH] D63256: [OpenCL] Split type and macro definitions into opencl-c-base.h

2019-06-21 Thread Yaxun Liu via Phabricator via cfe-commits
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

[PATCH] D63256: [OpenCL] Split type and macro definitions into opencl-c-base.h

2019-06-21 Thread Konstantin Zhuravlyov via Phabricator via cfe-commits
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

[PATCH] D63256: [OpenCL] Split type and macro definitions into opencl-c-base.h

2019-06-19 Thread Sven van Haastregt via Phabricator via cfe-commits
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:

[PATCH] D63256: [OpenCL] Split type and macro definitions into opencl-c-base.h

2019-06-18 Thread Andrew Savonichev via Phabricator via cfe-commits
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

[PATCH] D63256: [OpenCL] Split type and macro definitions into opencl-c-base.h

2019-06-14 Thread Sven van Haastregt via Phabricator via cfe-commits
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

[PATCH] D63256: [OpenCL] Split type and macro definitions into opencl-c-base.h

2019-06-14 Thread Andrew Savonichev via Phabricator via cfe-commits
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) {

[PATCH] D63256: [OpenCL] Split type and macro definitions into opencl-c-base.h

2019-06-13 Thread Sven van Haastregt via Phabricator via cfe-commits
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