| 1 |
// UNSUPPORTED: target={{.*}}-zos{{.*}}, target={{.*}}-aix{{.*}} |
| 2 |
// RUN: rm -rf %t |
| 3 |
// RUN: %clang_cc1 -emit-llvm -o - -fmodules-cache-path=%t -DA -fmodules -fimplicit-module-maps -F %S/Inputs/exportas-link %s | FileCheck --check-prefix=CHECK_A %s |
| 4 |
// CHECK_A: !llvm.linker.options = !{![[MODULE:[0-9]+]]} |
| 5 |
// CHECK_A: ![[MODULE]] = !{!"-framework", !"SomeKit"} |
| 6 |
#ifdef A |
| 7 |
@import SomeKitCore; |
| 8 |
@import SomeKit; |
| 9 |
#endif |
| 10 |
|
| 11 |
// RUN: %clang_cc1 -emit-llvm -o - -fmodules-cache-path=%t -DB -fmodules -fimplicit-module-maps -F %S/Inputs/exportas-link %s | FileCheck --check-prefix=CHECK_B %s |
| 12 |
// CHECK_B: !llvm.linker.options = !{![[MODULE:[0-9]+]]} |
| 13 |
// CHECK_B: ![[MODULE]] = !{!"-framework", !"SomeKit"} |
| 14 |
#ifdef B |
| 15 |
@import SomeKit; |
| 16 |
@import SomeKitCore; |
| 17 |
#endif |
| 18 |
|
| 19 |
// RUN: %clang_cc1 -emit-llvm -o - -fmodules-cache-path=%t -DC -fmodules -fimplicit-module-maps -F %S/Inputs/exportas-link %s | FileCheck --check-prefix=CHECK_C %s |
| 20 |
// CHECK_C: !llvm.linker.options = !{![[MODULE:[0-9]+]]} |
| 21 |
// CHECK_C: ![[MODULE]] = !{!"-framework", !"SomeKitCore"} |
| 22 |
#ifdef C |
| 23 |
@import SomeKitCore; |
| 24 |
#endif |
| 25 |
|
| 26 |
// RUN: %clang_cc1 -emit-llvm -o - -fmodules-cache-path=%t -DD -fmodules -fimplicit-module-maps -F %S/Inputs/exportas-link %s | FileCheck --check-prefix=CHECK_D %s |
| 27 |
// CHECK_D: !llvm.linker.options = !{![[MODULE:[0-9]+]]} |
| 28 |
// CHECK_D: ![[MODULE]] = !{!"-framework", !"SomeKit"} |
| 29 |
#ifdef D |
| 30 |
@import SomeKit; |
| 31 |
#endif |
| 32 |
|
| 33 |
// RUN: %clang_cc1 -emit-llvm -o - -fmodules-cache-path=%t -DE -fmodules -fimplicit-module-maps -F %S/Inputs/exportas-link %s | FileCheck --check-prefix=CHECK_E %s |
| 34 |
// CHECK_E: !llvm.linker.options = !{![[MODULE1:[0-9]+]], ![[MODULE2:[0-9]+]]} |
| 35 |
// CHECK_E: ![[MODULE1]] = !{!"-framework", !"OtherKit"} |
| 36 |
// CHECK_E: ![[MODULE2]] = !{!"-framework", !"SomeKitCore"} |
| 37 |
#ifdef E |
| 38 |
@import OtherKit; |
| 39 |
#endif |
| 40 |
|
| 41 |
// RUN: %clang_cc1 -emit-llvm -o - -fmodules-cache-path=%t -DF -fmodules -fimplicit-module-maps -F %S/Inputs/exportas-link %s | FileCheck --check-prefix=CHECK_F %s |
| 42 |
// CHECK_F: !llvm.linker.options = !{![[MODULE1:[0-9]+]], ![[MODULE2:[0-9]+]]} |
| 43 |
// CHECK_F: ![[MODULE1]] = !{!"-framework", !"OtherKit"} |
| 44 |
// CHECK_F: ![[MODULE2]] = !{!"-framework", !"SomeKit"} |
| 45 |
#ifdef F |
| 46 |
@import OtherKit; |
| 47 |
#endif |