diff options
author | dim <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
commit | c72c57c9e9b69944e3e009cd5e209634839581d3 (patch) | |
tree | 4fc2f184c499d106f29a386c452b49e5197bf63d /test/Modules/autolink.m | |
parent | 5b20025c30d23d521e12c1f33ec8fa6b821952cd (diff) | |
download | FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.zip FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.tar.gz |
Vendor import of clang trunk r178860:
http://llvm.org/svn/llvm-project/cfe/trunk@178860
Diffstat (limited to 'test/Modules/autolink.m')
-rw-r--r-- | test/Modules/autolink.m | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/test/Modules/autolink.m b/test/Modules/autolink.m new file mode 100644 index 0000000..7f75473 --- /dev/null +++ b/test/Modules/autolink.m @@ -0,0 +1,40 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -emit-llvm -o - -fmodules-cache-path=%t -fmodules -fmodules-autolink -F %S/Inputs -I %S/Inputs %s | FileCheck %s + +@import autolink.sub2; + +int f() { + return autolink_sub2(); +} + +@import autolink; + +int g() { + return autolink; +} + +@import Module.SubFramework; +const char *get_module_subframework() { + return module_subframework; +} + +@import DependsOnModule.SubFramework; +float *get_module_subframework_dep() { + return sub_framework; +} + +@import NoUmbrella; +int use_no_umbrella() { + return no_umbrella_A; +} + +// NOTE: "autolink_sub" is intentionally not linked. + +// CHECK: !llvm.module.flags = !{!0, !1, !2, !3, !4} +// CHECK: !4 = metadata !{i32 6, metadata !"Linker Options", metadata ![[AUTOLINK_OPTIONS:[0-9]+]]} +// 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]+]]} +// CHECK: ![[AUTOLINK_FRAMEWORK]] = metadata !{metadata !"-framework", metadata !"autolink_framework"} +// CHECK: ![[AUTOLINK]] = metadata !{metadata !"-lautolink"} +// CHECK: ![[DEPENDSONMODULE]] = metadata !{metadata !"-framework", metadata !"DependsOnModule"} +// CHECK: ![[MODULE]] = metadata !{metadata !"-framework", metadata !"Module"} +// CHECK: ![[NOUMBRELLA]] = metadata !{metadata !"-framework", metadata !"NoUmbrella"} |