|
35 | 35 | // RUN: %clang_cl -### -fsycl -fsycl-device-only -o dummy.out %s 2>&1 \
|
36 | 36 | // RUN: | FileCheck -check-prefix=CHECK-OUTPUT-FILE %s
|
37 | 37 | // CHECK-OUTPUT-FILE: clang{{.*}} "-o" "dummy.out"
|
| 38 | + |
| 39 | +/// -fsycl-device-only with preprocessing should only do the device compile |
| 40 | +// RUN: %clang -ccc-print-phases -E -fsycl -fsycl-device-only %s 2>&1 \ |
| 41 | +// RUN: | FileCheck -check-prefix=PHASES-PREPROCESS %s |
| 42 | +// RUN: %clang_cl -ccc-print-phases -E -fsycl -fsycl-device-only %s 2>&1 \ |
| 43 | +// RUN: | FileCheck -check-prefix=PHASES-PREPROCESS %s |
| 44 | +// RUN: %clang_cl -ccc-print-phases -P -fsycl -fsycl-device-only %s 2>&1 \ |
| 45 | +// RUN: | FileCheck -check-prefix=PHASES-PREPROCESS %s |
| 46 | +// RUN: %clang_cl -ccc-print-phases -EP -fsycl -fsycl-device-only %s 2>&1 \ |
| 47 | +// RUN: | FileCheck -check-prefix=PHASES-PREPROCESS %s |
| 48 | +// PHASES-PREPROCESS: 0: input, {{.*}}, c++, (device-sycl) |
| 49 | +// PHASES-PREPROCESS: 1: preprocessor, {0}, c++-cpp-output, (device-sycl) |
| 50 | +// PHASES-PREPROCESS: 2: offload, "device-sycl (spir64-unknown-unknown-sycldevice)" {1}, c++-cpp-output |
| 51 | + |
| 52 | +// RUN: %clang -ccc-print-phases -MM -fsycl -fsycl-device-only %s 2>&1 \ |
| 53 | +// RUN: | FileCheck -check-prefix=PHASES-PREPROC-DEPS %s |
| 54 | +// RUN: %clang -ccc-print-phases -M -fsycl -fsycl-device-only %s 2>&1 \ |
| 55 | +// RUN: | FileCheck -check-prefix=PHASES-PREPROC-DEPS %s |
| 56 | +// PHASES-PREPROC-DEPS: 0: input, {{.*}}, c++, (device-sycl) |
| 57 | +// PHASES-PROPROC-DEPS: 1: preprocessor, {0}, dependencies, (device-sycl) |
| 58 | +// PHASES-PREPROC-DEPS: 2: offload, "device-sycl (spir64-unknown-unknown-sycldevice)" {1}, dependencies |
0 commit comments