File tree 2 files changed +23
-18
lines changed
2 files changed +23
-18
lines changed Original file line number Diff line number Diff line change 111
111
// Make sure we don't link anything.
112
112
// RUN: -check-prefix CUDA-NL %s
113
113
114
- // --cuda-host-only should never trigger unused arg warning.
115
- // RUN: %clang -### -target x86_64-linux-gnu --cuda-host-only -c %s 2>&1 | \
116
- // RUN: FileCheck -check-prefix CUDA-NO-UNUSED-CHO %s
117
- // RUN: %clang -### -target x86_64-linux-gnu --cuda-host-only -x c -c %s 2>&1 | \
118
- // RUN: FileCheck -check-prefix CUDA-NO-UNUSED-CHO %s
119
-
120
- // --cuda-device-only should not produce warning compiling CUDA files
121
- // RUN: %clang -### -target x86_64-linux-gnu --cuda-device-only -c %s 2>&1 | \
122
- // RUN: FileCheck -check-prefix CUDA-NO-UNUSED-CDO %s
123
-
124
- // --cuda-device-only should warn during non-CUDA compilation.
125
- // RUN: %clang -### -target x86_64-linux-gnu --cuda-device-only -x c -c %s 2>&1 | \
126
- // RUN: FileCheck -check-prefix CUDA-UNUSED-CDO %s
127
-
128
114
// Match device-side preprocessor, and compiler phases with -save-temps
129
115
// CUDA-D1S: "-cc1" "-triple" "nvptx64-nvidia-cuda"
130
116
// CUDA-D1S-SAME: "-aux-triple" "x86_64--linux-gnu"
189
175
190
176
// Match no linker
191
177
// CUDA-NL-NOT: "{{.*}}{{ld|link}}{{(.exe)?}}"
192
-
193
- // CUDA-NO-UNUSED-CHO-NOT: warning: argument unused during compilation: '--cuda-host-only'
194
- // CUDA-UNUSED-CDO: warning: argument unused during compilation: '--cuda-device-only'
195
- // CUDA-NO-UNUSED-CDO-NOT: warning: argument unused during compilation: '--cuda-device-only'
Original file line number Diff line number Diff line change
1
+ // Tests that we trigger unused-arg warnings on CUDA flags appropriately.
2
+
3
+ // REQUIRES: clang-driver
4
+ // REQUIRES: x86-registered-target
5
+ // REQUIRES: nvptx-registered-target
6
+
7
+ // --cuda-host-only should never trigger unused arg warning.
8
+ // RUN: %clang -### -target x86_64-linux-gnu --cuda-host-only -c %s 2>&1 | \
9
+ // RUN: FileCheck %s
10
+ // RUN: %clang -### -target x86_64-linux-gnu --cuda-host-only -x c -c %s 2>&1 | \
11
+ // RUN: FileCheck %s
12
+
13
+ // --cuda-device-only should warn during non-CUDA compilation.
14
+ // RUN: %clang -### -target x86_64-linux-gnu --cuda-device-only -x c -c %s 2>&1 | \
15
+ // RUN: FileCheck -check-prefix UNUSED-CDO %s
16
+
17
+ // --cuda-device-only should not produce warning compiling CUDA files
18
+ // RUN: %clang -### -target x86_64-linux-gnu --cuda-device-only -c %s 2>&1 | \
19
+ // RUN: FileCheck -check-prefix NO-UNUSED-CDO %s
20
+
21
+ // CHECK-NOT: warning: argument unused during compilation: '--cuda-host-only'
22
+ // UNUSED-CDO: warning: argument unused during compilation: '--cuda-device-only'
23
+ // NO-UNUSED-CDO-NOT: warning: argument unused during compilation: '--cuda-device-only'
You can’t perform that action at this time.
0 commit comments