summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/modules-ts/basic/basic.def.odr/p4/module.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2017-07-06 00:30:00 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2017-07-06 00:30:00 +0000
commitb51cf1136fe231b45dc45713086d182b3a75e773 (patch)
tree7fa6f38d56006cf3051b6a0330aa01f8a9f8e881 /clang/test/CXX/modules-ts/basic/basic.def.odr/p4/module.cpp
parent29c5f16ad028238d743f958b8205c53fad3d2e1d (diff)
downloadbcm5719-llvm-b51cf1136fe231b45dc45713086d182b3a75e773.tar.gz
bcm5719-llvm-b51cf1136fe231b45dc45713086d182b3a75e773.zip
[modules ts] Do not emit strong function definitions from the module interface unit in every user.
llvm-svn: 307232
Diffstat (limited to 'clang/test/CXX/modules-ts/basic/basic.def.odr/p4/module.cpp')
-rw-r--r--clang/test/CXX/modules-ts/basic/basic.def.odr/p4/module.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/clang/test/CXX/modules-ts/basic/basic.def.odr/p4/module.cpp b/clang/test/CXX/modules-ts/basic/basic.def.odr/p4/module.cpp
new file mode 100644
index 00000000000..c8b8725ed2a
--- /dev/null
+++ b/clang/test/CXX/modules-ts/basic/basic.def.odr/p4/module.cpp
@@ -0,0 +1,23 @@
+// RUN: %clang_cc1 -fmodules-ts %S/module.cppm -triple %itanium_abi_triple -emit-module-interface -o %t
+// RUN: %clang_cc1 -fmodules-ts %s -triple %itanium_abi_triple -fmodule-file=%t -emit-llvm -o - | FileCheck %s --implicit-check-not=unused --implicit-check-not=global_module
+
+module Module;
+
+void use() {
+ // CHECK: define linkonce_odr {{.*}}@_Z20used_inline_exportedv
+ used_inline_exported();
+ // CHECK: declare {{.*}}@_Z18noninline_exportedv
+ noninline_exported();
+
+ // FIXME: This symbol should not be visible here.
+ // CHECK: define internal {{.*}}@_ZL26used_static_module_linkagev
+ used_static_module_linkage();
+
+ // FIXME: The module name should be mangled into the name of this function.
+ // CHECK: define linkonce_odr {{.*}}@_Z26used_inline_module_linkagev
+ used_inline_module_linkage();
+
+ // FIXME: The module name should be mangled into the name of this function.
+ // CHECK: declare {{.*}}@_Z24noninline_module_linkagev
+ noninline_module_linkage();
+}
OpenPOWER on IntegriCloud