]> granicus.if.org Git - clang/commit
[OpenCL] Split type and macro definitions into opencl-c-base.h
authorSven van Haastregt <sven.vanhaastregt@arm.com>
Wed, 19 Jun 2019 12:48:22 +0000 (12:48 +0000)
committerSven van Haastregt <sven.vanhaastregt@arm.com>
Wed, 19 Jun 2019 12:48:22 +0000 (12:48 +0000)
commit1d6967454f5879df81398eca7277f3bf32c47dbd
treea21935a13984b42e7469ed1eeb3abbdde5144c76
parent7a5dd209e33cb6330a14bb5a076efd347c106218
[OpenCL] Split type and macro definitions into opencl-c-base.h

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@363794 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/SyncScope.h
lib/Frontend/CompilerInvocation.cpp
lib/Headers/CMakeLists.txt
lib/Headers/module.modulemap
lib/Headers/opencl-c-base.h [new file with mode: 0644]
lib/Headers/opencl-c.h
test/SemaOpenCL/fdeclare-opencl-builtins.cl