|
5 | 5 | //
|
6 | 6 | // RUN: clang-offload-deps --help | FileCheck %s --check-prefix CHECK-HELP
|
7 | 7 | // CHECK-HELP: {{.*}}OVERVIEW: A tool for creating dependence bitcode files for offload targets. Takes
|
8 |
| -// CHECK-HELP: {{.*}}host image as input and produces bitcode files, one per offload target, with |
9 |
| -// CHECK-HELP: {{.*}}references to symbols that must be defined in target images. |
| 8 | +// CHECK-HELP-NEXT: {{.*}}host image as input and produces bitcode files, one per offload target, with |
| 9 | +// CHECK-HELP-NEXT: {{.*}}references to symbols that must be defined in target images. |
10 | 10 | // CHECK-HELP: {{.*}}USAGE: clang-offload-deps [options] <input file>
|
11 | 11 | // CHECK-HELP: {{.*}} --outputs=<string> - [<output file>,...]
|
12 | 12 | // CHECK-HELP: {{.*}} --targets=<string> - [<offload kind>-<target triple>,...]
|
|
36 | 36 | // CHECK-DEPS-SPIR64: @foo = external global i8*
|
37 | 37 | // CHECK-DEPS-SPIR64: @llvm.used = appending global [2 x i8*] [i8* bitcast (i8** @bar to i8*), i8* bitcast (i8** @foo to i8*)], section "llvm.metadata"
|
38 | 38 |
|
| 39 | +// |
| 40 | +// Check that input with no .tgtsym section is handled correctly. |
| 41 | +// |
| 42 | +// RUN: clang-offload-deps -targets=openmp-x86_64-pc-linux-gnu,sycl-spir64 -outputs=%t.empty.x86_64,%t.empty.spir64 %t.host |
| 43 | +// RUN: llvm-dis -o - %t.empty.x86_64 | FileCheck %s --check-prefixes=CHECK-EMPTY-X86_64 |
| 44 | +// RUN: llvm-dis -o - %t.empty.spir64 | FileCheck %s --check-prefixes=CHECK-EMPTY-SPIR64 |
| 45 | + |
| 46 | +// CHECK-EMPTY-X86_64: target triple = "x86_64-pc-linux-gnu" |
| 47 | +// CHECK-EMPTY-X86_64-NOT: @offload.symbols |
| 48 | + |
| 49 | +// CHECK-EMPTY-SPIR64: target triple = "spir64" |
| 50 | +// CHECK-EMPTY-SPIR64-NOT: @llvm.used |
| 51 | + |
39 | 52 | void foo(void) {}
|
40 | 53 | void bar(void) {}
|
0 commit comments