Skip to content

Commit 9652971

Browse files
committed
Updated LIT test to address review comments.
1 parent 007bcac commit 9652971

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

clang/test/Driver/clang-offload-deps.c

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
//
66
// RUN: clang-offload-deps --help | FileCheck %s --check-prefix CHECK-HELP
77
// 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.
1010
// CHECK-HELP: {{.*}}USAGE: clang-offload-deps [options] <input file>
1111
// CHECK-HELP: {{.*}} --outputs=<string> - [<output file>,...]
1212
// CHECK-HELP: {{.*}} --targets=<string> - [<offload kind>-<target triple>,...]
@@ -36,5 +36,18 @@
3636
// CHECK-DEPS-SPIR64: @foo = external global i8*
3737
// 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"
3838

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+
3952
void foo(void) {}
4053
void bar(void) {}

0 commit comments

Comments
 (0)