mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-15 18:36:27 +00:00

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@david.davidtw.co> Signed-off-by: Ruyman Reyes <ruyman@codeplay.com> Subscribers: ebevhan, Anastasia, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D72857 Signed-off-by: Alexey Bader <alexey.bader@intel.com>
10 lines
545 B
C++
10 lines
545 B
C++
// RUN: %clang_cc1 %s -E -dM | FileCheck %s
|
|
// RUN: %clang_cc1 %s -fsycl -sycl-std=2017 -E -dM | FileCheck --check-prefix=CHECK-SYCL-STD %s
|
|
// RUN: %clang_cc1 %s -fsycl -fsycl-is-device -sycl-std=1.2.1 -E -dM | FileCheck --check-prefix=CHECK-SYCL-STD %s
|
|
// RUN: %clang_cc1 %s -fsycl -fsycl-is-device -E -dM | FileCheck --check-prefixes=CHECK-SYCL %s
|
|
|
|
// CHECK-NOT:#define __SYCL_DEVICE_ONLY__ 1
|
|
// CHECK-NOT:#define CL_SYCL_LANGUAGE_VERSION 121
|
|
// CHECK-SYCL-STD:#define CL_SYCL_LANGUAGE_VERSION 121
|
|
// CHECK-SYCL:#define __SYCL_DEVICE_ONLY__ 1
|