[all-commits] [llvm/llvm-project] 118b05: [SYCL] Driver option to select SYCL version

Ruyman via All-commits all-commits at lists.llvm.org
Sat Mar 7 11:10:11 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 118b057f1268d1789e40ffceb214e73772df04f4
      https://github.com/llvm/llvm-project/commit/118b057f1268d1789e40ffceb214e73772df04f4
  Author: Ruyman <ruyman at codeplay.com>
  Date:   2020-03-07 (Sat, 07 Mar 2020)

  Changed paths:
    M clang/include/clang/Basic/LangOptions.def
    M clang/include/clang/Driver/Options.td
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/lib/Frontend/CompilerInvocation.cpp
    M clang/lib/Frontend/InitPreprocessor.cpp
    M clang/test/Driver/sycl.c
    M clang/test/Frontend/sycl-aux-triple.cpp
    M clang/test/Preprocessor/sycl-macro.cpp
    M clang/test/SemaSYCL/kernel-attribute.cpp

  Log Message:
  -----------
  [SYCL] Driver option to select SYCL version

Summary:
User can select the version of SYCL the compiler will
use via the flag -sycl-std, similar to -cl-std.

The flag defines the LangOpts.SYCLVersion option to the
version of SYCL. The default value is undefined.
If driver is building SYCL code, flag is set to the default SYCL
version (1.2.1)

The preprocessor uses this variable to define CL_SYCL_LANGUAGE_VERSION macro,
which should be defined according to SYCL 1.2.1 standard.

Only valid value at this point for the flag is 1.2.1.

Co-Authored-By: David Wood <Q0KPU0H1YOEPHRY1R2SN5B5RL at david.davidtw.co>
Signed-off-by: Ruyman Reyes <ruyman at codeplay.com>

Subscribers: ebevhan, Anastasia, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D72857




More information about the All-commits mailing list