| 1 | // RUN: rm -rf %t |
| 2 | // 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 |
| 3 | // CHECK_A: !llvm.linker.options = !{![[MODULE:[0-9]+]]} |
| 4 | // CHECK_A: ![[MODULE]] = !{!"-framework", !"SomeKit"} |
| 5 | #ifdef A |
| 6 | @import SomeKitCore; |
| 7 | @import SomeKit; |
| 8 | #endif |
| 9 | |
| 10 | // 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 |
| 11 | // CHECK_B: !llvm.linker.options = !{![[MODULE:[0-9]+]]} |
| 12 | // CHECK_B: ![[MODULE]] = !{!"-framework", !"SomeKit"} |
| 13 | #ifdef B |
| 14 | @import SomeKit; |
| 15 | @import SomeKitCore; |
| 16 | #endif |
| 17 | |
| 18 | // 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 |
| 19 | // CHECK_C: !llvm.linker.options = !{![[MODULE:[0-9]+]]} |
| 20 | // CHECK_C: ![[MODULE]] = !{!"-framework", !"SomeKitCore"} |
| 21 | #ifdef C |
| 22 | @import SomeKitCore; |
| 23 | #endif |
| 24 | |
| 25 | // 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 |
| 26 | // CHECK_D: !llvm.linker.options = !{![[MODULE:[0-9]+]]} |
| 27 | // CHECK_D: ![[MODULE]] = !{!"-framework", !"SomeKit"} |
| 28 | #ifdef D |
| 29 | @import SomeKit; |
| 30 | #endif |
| 31 | |
| 32 | // 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 |
| 33 | // CHECK_E: !llvm.linker.options = !{![[MODULE:[0-9]+]]} |
| 34 | // CHECK_E: ![[MODULE]] = !{!"-framework", !"SomeKitCore"} |
| 35 | #ifdef E |
| 36 | @import OtherKit; |
| 37 | #endif |
| 38 | |
| 39 | // 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 |
| 40 | // CHECK_F: !llvm.linker.options = !{![[MODULE:[0-9]+]]} |
| 41 | // CHECK_F: ![[MODULE]] = !{!"-framework", !"SomeKit"} |
| 42 | #ifdef F |
| 43 | @import OtherKit; |
| 44 | #endif |
| 45 | |