[PATCH] D78979: OpenCL: Include builtin header by default

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 28 06:56:19 PDT 2020


Anastasia added a comment.

In D78979#2007563 <https://reviews.llvm.org/D78979#2007563>, @Anastasia wrote:

> > 
> > 
> >> I am looping in @svenvh to discuss this further. Sven, do you think we should rename this flag due to current proposed change? Should it be moved out of `-cc1` too?
> > 
> > I would leave `-fdeclare-opencl-builtins` as it is, until it is complete and taken out of its "experimental" status.  Then we can discuss if we want to use TableGen instead of the header as a default.
>
> Would it not become confusing since the builtins are going to be included by default? Should we rename the flag at least? Also ideally it should be documented in https://clang.llvm.org/docs/UsersManual.html#opencl-header


ah I guess if we leave it under `-cc1 ` we will have the command line interface as follows:

- Driver (without `-cc1`) adds OpenCL header by default that can be overridden by the flag added in this patch.
- Frontend (with `-cc1`) doesn't add the header by default but there are two flags `-fdeclare-opencl-builtins` or `-finclude-default-header` that allow to include the header.

Is my understanding correct? We should reflect this is the User Manual.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78979/new/

https://reviews.llvm.org/D78979





More information about the cfe-commits mailing list