2 // RUN: %clang_cc1 -emit-pch -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -o %t.pch -I %S/Inputs -x objective-c-header %S/Inputs/autolink-sub3.pch
3 // RUN: %clang_cc1 -emit-llvm -o - -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs -I %S/Inputs -include-pch %t.pch %s | FileCheck %s
4 // RUN: %clang_cc1 -emit-llvm -fno-autolink -o - -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs -I %S/Inputs -include-pch %t.pch %s | FileCheck --check-prefix=CHECK-AUTOLINK-DISABLED %s
9 return autolink_sub2();
18 @import Module.SubFramework;
19 const char *get_module_subframework() {
20 return module_subframework;
23 @import DependsOnModule.SubFramework;
24 float *get_module_subframework_dep() {
29 int use_no_umbrella() {
33 int use_autolink_sub3() {
34 return autolink_sub3();
37 // NOTE: "autolink_sub" is intentionally not linked.
39 // CHECK: !llvm.linker.options = !{![[AUTOLINK_PCH:[0-9]+]], ![[AUTOLINK_FRAMEWORK:[0-9]+]], ![[AUTOLINK:[0-9]+]], ![[DEPENDSONMODULE:[0-9]+]], ![[MODULE:[0-9]+]], ![[NOUMBRELLA:[0-9]+]]}
40 // CHECK: ![[AUTOLINK_PCH]] = !{!"{{(\\01|-l|/DEFAULTLIB:|lib", !")}}autolink_from_pch{{(\.lib)?}}"}
41 // CHECK: ![[AUTOLINK_FRAMEWORK]] = !{!"-framework", !"autolink_framework"}
42 // CHECK: ![[AUTOLINK]] = !{!"{{(\\01|-l|/DEFAULTLIB:|lib", !")}}autolink{{(\.lib)?}}"}
43 // CHECK: ![[DEPENDSONMODULE]] = !{!"-framework", !"DependsOnModule"}
44 // CHECK: ![[MODULE]] = !{!"-framework", !"Module"}
45 // CHECK: ![[NOUMBRELLA]] = !{!"-framework", !"NoUmbrella"}
47 // CHECK-AUTOLINK-DISABLED: !llvm.module.flags
48 // CHECK-AUTOLINK-DISABLED-NOT: !llvm.linker.options