[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Driver / fat-archive-unbundle-ext.c
blobb409aa6313b1ea6faf1b85745b1a077072aded52
1 // REQUIRES: x86-registered-target
2 // UNSUPPORTED: target={{.*-windows.*}}, target={{.*-darwin.*}}, target={{.*}}-aix{{.*}}
4 // Generate dummy fat object
5 // RUN: %clang -O0 -target %itanium_abi_triple %s -c -o %t.host.o
6 // RUN: echo 'Content of device file' > %t.tgt.o
7 // RUN: clang-offload-bundler -type=o -targets=host-%itanium_abi_triple,openmp-%itanium_abi_triple -input=%t.host.o -input=%t.tgt.o -output=%t.fat.obj
9 // Then create a static archive with that object
10 // RUN: rm -f %t.fat.a
11 // RUN: llvm-ar cr %t.fat.a %t.fat.obj
13 // Unbundle device part from the archive. Check that bundler does not print warnings.
14 // RUN: clang-offload-bundler -unbundle -type=a -targets=openmp-%itanium_abi_triple -input=%t.fat.a -output=%t.tgt.a 2>&1 | FileCheck --allow-empty --check-prefix=CHECK-WARNING %s
15 // CHECK-WARNING-NOT: warning
17 // Check that device archive member inherited file extension from the original file.
18 // RUN: llvm-ar t %t.tgt.a | FileCheck --check-prefix=CHECK-ARCHIVE %s
19 // CHECK-ARCHIVE: {{\.obj$}}
21 void foo(void) {}