summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/modules-ts/basic/basic.def.odr
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2019-04-22 22:50:11 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2019-04-22 22:50:11 +0000
commite181de7f4fe9c75327836e5493c2783bcefc9293 (patch)
tree014979d3a317a1d57bcb86609e0d1f11c98ebd55 /clang/test/CXX/modules-ts/basic/basic.def.odr
parent68602ab2f3535291753a6149d1f445c5fd416152 (diff)
downloadbcm5719-llvm-e181de7f4fe9c75327836e5493c2783bcefc9293.tar.gz
bcm5719-llvm-e181de7f4fe9c75327836e5493c2783bcefc9293.zip
[c++2a] Implement semantic restrictions for 'export' declarations.
llvm-svn: 358932
Diffstat (limited to 'clang/test/CXX/modules-ts/basic/basic.def.odr')
-rw-r--r--clang/test/CXX/modules-ts/basic/basic.def.odr/p4/module.cpp2
-rw-r--r--clang/test/CXX/modules-ts/basic/basic.def.odr/p4/module.cppm16
-rw-r--r--clang/test/CXX/modules-ts/basic/basic.def.odr/p4/user.cpp2
3 files changed, 0 insertions, 20 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
index ad03191363e..6eb5639d302 100644
--- 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
@@ -3,7 +3,6 @@
// CHECK-DAG: @extern_var_exported = external {{(dso_local )?}}global
// CHECK-DAG: @inline_var_exported = linkonce_odr {{(dso_local )?}}global
-// CHECK-DAG: @_ZW6ModuleE19static_var_exported = available_externally {{(dso_local )?}}global i32 0,
// CHECK-DAG: @const_var_exported = available_externally {{(dso_local )?}}constant i32 3,
//
// CHECK-DAG: @_ZW6ModuleE25extern_var_module_linkage = external {{(dso_local )?}}global
@@ -21,7 +20,6 @@ void use() {
(void)&extern_var_exported;
(void)&inline_var_exported;
- (void)&static_var_exported; // FIXME: Should not be exported.
(void)&const_var_exported;
// FIXME: This symbol should not be visible here.
diff --git a/clang/test/CXX/modules-ts/basic/basic.def.odr/p4/module.cppm b/clang/test/CXX/modules-ts/basic/basic.def.odr/p4/module.cppm
index 0f2c0db66e9..65861f84bae 100644
--- a/clang/test/CXX/modules-ts/basic/basic.def.odr/p4/module.cppm
+++ b/clang/test/CXX/modules-ts/basic/basic.def.odr/p4/module.cppm
@@ -11,7 +11,6 @@
// can discard this global and its initializer (if any), and other TUs are not
// permitted to run the initializer for this variable.
// CHECK-DAG: @inline_var_exported = linkonce_odr {{(dso_local )?}}global
-// CHECK-DAG: @_ZW6ModuleE19static_var_exported = {{(dso_local )?}}global
// CHECK-DAG: @const_var_exported = {{(dso_local )?}}constant
//
// CHECK-DAG: @_ZW6ModuleE25extern_var_module_linkage = external {{(dso_local )?}}global
@@ -58,32 +57,17 @@ void noninline_global_module() {
export module Module;
export {
- // FIXME: These should be ill-formed: you can't export an internal linkage
- // symbol, per [dcl.module.interface]p2.
- // CHECK: define {{(dso_local )?}}void {{.*}}@_ZW6ModuleE22unused_static_exportedv
- static void unused_static_exported() {}
- // CHECK: define {{(dso_local )?}}void {{.*}}@_ZW6ModuleE20used_static_exportedv
- static void used_static_exported() {}
-
inline void unused_inline_exported() {}
inline void used_inline_exported() {}
extern int extern_var_exported;
inline int inline_var_exported;
- // FIXME: This should be ill-formed: you can't export an internal linkage
- // symbol.
- static int static_var_exported;
const int const_var_exported = 3;
// CHECK: define {{(dso_local )?}}void {{.*}}@_Z18noninline_exportedv
void noninline_exported() {
- used_static_exported();
- // CHECK: define linkonce_odr {{.*}}@_Z20used_inline_exportedv
- used_inline_exported();
-
(void)&extern_var_exported;
(void)&inline_var_exported;
- (void)&static_var_exported;
(void)&const_var_exported;
}
}
diff --git a/clang/test/CXX/modules-ts/basic/basic.def.odr/p4/user.cpp b/clang/test/CXX/modules-ts/basic/basic.def.odr/p4/user.cpp
index 97c69fa0bbe..d55e0637971 100644
--- a/clang/test/CXX/modules-ts/basic/basic.def.odr/p4/user.cpp
+++ b/clang/test/CXX/modules-ts/basic/basic.def.odr/p4/user.cpp
@@ -3,7 +3,6 @@
// CHECK-DAG: @extern_var_exported = external {{(dso_local )?}}global
// CHECK-DAG: @inline_var_exported = linkonce_odr {{(dso_local )?}}global
-// CHECK-DAG: @_ZW6ModuleE19static_var_exported = available_externally {{(dso_local )?}}global i32 0
// CHECK-DAG: @const_var_exported = available_externally {{(dso_local )?}}constant i32 3
import Module;
@@ -16,7 +15,6 @@ void use() {
(void)&extern_var_exported;
(void)&inline_var_exported;
- (void)&static_var_exported;
(void)&const_var_exported;
// Module-linkage declarations are not visible here.
OpenPOWER on IntegriCloud