1// RUN: rm -rf %t 2// RUN: %clang_cc1 -emit-llvm -o - -fmodules-cache-path=%t -fmodules -fmodules-autolink -F %S/Inputs -I %S/Inputs %s | FileCheck %s 3 4@import autolink.sub2; 5 6int f() { 7 return autolink_sub2(); 8} 9 10@import autolink; 11 12int g() { 13 return autolink; 14} 15 16@import Module.SubFramework; 17const char *get_module_subframework() { 18 return module_subframework; 19} 20 21@import DependsOnModule.SubFramework; 22float *get_module_subframework_dep() { 23 return sub_framework; 24} 25 26@import NoUmbrella; 27int use_no_umbrella() { 28 return no_umbrella_A; 29} 30 31// NOTE: "autolink_sub" is intentionally not linked. 32 33// CHECK: !llvm.module.flags = !{!0, !1, !2, !3, !4} 34// CHECK: !4 = metadata !{i32 6, metadata !"Linker Options", metadata ![[AUTOLINK_OPTIONS:[0-9]+]]} 35// CHECK: ![[AUTOLINK_OPTIONS]] = metadata !{metadata ![[AUTOLINK_FRAMEWORK:[0-9]+]], metadata ![[AUTOLINK:[0-9]+]], metadata ![[DEPENDSONMODULE:[0-9]+]], metadata ![[MODULE:[0-9]+]], metadata ![[NOUMBRELLA:[0-9]+]]} 36// CHECK: ![[AUTOLINK_FRAMEWORK]] = metadata !{metadata !"-framework", metadata !"autolink_framework"} 37// CHECK: ![[AUTOLINK]] = metadata !{metadata !"-lautolink"} 38// CHECK: ![[DEPENDSONMODULE]] = metadata !{metadata !"-framework", metadata !"DependsOnModule"} 39// CHECK: ![[MODULE]] = metadata !{metadata !"-framework", metadata !"Module"} 40// CHECK: ![[NOUMBRELLA]] = metadata !{metadata !"-framework", metadata !"NoUmbrella"} 41