[PATCH] D72857: [SYCL] Driver option to enable SYCL mode and select SYCL version
Alexey Bataev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 18 07:02:40 PST 2020
ABataev added inline comments.
================
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:2549
+ Opts.SYCLIsDevice = Opts.SYCL && Args.hasArg(options::OPT_fsycl_is_device);
+ if (Opts.SYCL || Opts.SYCLIsDevice) {
+ // -sycl-std applies to any SYCL source, not only those containing kernels,
----------------
Just `Opt.SYCL` should be enough
================
Comment at: clang/lib/Frontend/InitPreprocessor.cpp:455
+ // SYCL Version is set to a value when building SYCL applications
+ switch (LangOpts.getSYCLVersion()) {
+ case LangOptions::SYCLVersionList::SYCL_2015:
----------------
Must be guarded with `LangOpts.SYCL`:
```
if (LangOpts.SYCL) ...
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72857/new/
https://reviews.llvm.org/D72857
More information about the cfe-commits
mailing list