Files
clang-p2996/clang/test/CXX/modules-ts/basic/basic.def.odr/p4/user.cpp
Rafael Espindola 922f2aa9b2 Bring r325915 back.
The tests that failed on a windows host have been fixed.

Original message:

Start setting dso_local for COFF.

With this there are still some GVs where we don't set dso_local
because setGVProperties is never called. I intend to fix that in
followup commits. This is just the bare minimum to teach
shouldAssumeDSOLocal what it should do for COFF.

llvm-svn: 325940
2018-02-23 19:30:48 +00:00

24 lines
987 B
C++

// 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
// 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;
void use() {
// CHECK: define linkonce_odr {{.*}}@_Z20used_inline_exportedv
used_inline_exported();
// CHECK: declare {{.*}}@_Z18noninline_exportedv
noninline_exported();
(void)&extern_var_exported;
(void)&inline_var_exported;
(void)&static_var_exported;
(void)&const_var_exported;
// Module-linkage declarations are not visible here.
}