mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-14 09:56:33 +00:00

Currently, we have support for SYCL 1.2.1 (also known as SYCL 2017). This patch introduces the start of support for SYCL 2020 mode, which is the latest SYCL standard available at (https://www.khronos.org/registry/SYCL/specs/sycl-2020/html/sycl-2020.html). This sets the default SYCL to be 2020 in the driver, and introduces the notion of a "default" version (set to 2020) when cc1 is in SYCL mode but there was no explicit -sycl-std= specified on the command line.
15 lines
1019 B
C++
15 lines
1019 B
C++
// RUN: %clang_cc1 %s -E -dM | FileCheck %s
|
|
// RUN: %clang_cc1 %s -fsycl-is-device -sycl-std=2017 -E -dM | FileCheck --check-prefix=CHECK-SYCL-STD %s
|
|
// RUN: %clang_cc1 %s -fsycl-is-host -sycl-std=2017 -E -dM | FileCheck --check-prefix=CHECK-SYCL-STD %s
|
|
// RUN: %clang_cc1 %s -fsycl-is-host -sycl-std=2020 -E -dM | FileCheck --check-prefix=CHECK-SYCL-STD-2020 %s
|
|
// RUN: %clang_cc1 %s -fsycl-is-host -E -dM | FileCheck --check-prefix=CHECK-SYCL-STD-2020 %s
|
|
// RUN: %clang_cc1 %s -fsycl-is-device -sycl-std=1.2.1 -E -dM | FileCheck --check-prefix=CHECK-SYCL-STD %s
|
|
// RUN: %clang_cc1 %s -fsycl-is-device -sycl-std=2020 -E -dM | FileCheck --check-prefix=CHECK-SYCL-STD-2020 %s
|
|
// RUN: %clang_cc1 %s -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-STD-2020:#define SYCL_LANGUAGE_VERSION 202001
|
|
// CHECK-SYCL:#define __SYCL_DEVICE_ONLY__ 1
|