1 // RUN: %clang_cc1 -fmodules-ts %S/module.cppm -triple %itanium_abi_triple -emit-module-interface -o %t
2 // 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
3
4 // CHECK-DAG: @extern_var_exported = external {{(dso_local )?}}global
5 // CHECK-DAG: @inline_var_exported = linkonce_odr {{(dso_local )?}}global
6 // CHECK-DAG: @const_var_exported = available_externally {{(dso_local )?}}constant i32 3
7
8 import Module;
9
use()10 void use() {
11 // CHECK: define linkonce_odr {{.*}}@_Z20used_inline_exportedv
12 used_inline_exported();
13 // CHECK: declare {{.*}}@_Z18noninline_exportedv
14 noninline_exported();
15
16 (void)&extern_var_exported;
17 (void)&inline_var_exported;
18 (void)&const_var_exported;
19
20 // Module-linkage declarations are not visible here.
21 }
22