1 // Address: https://github.com/llvm/llvm-project/issues/60693
5 // RUN: split-file %s %t
7 // RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple %t/a.cppm -emit-module-interface -o %t/a.pcm
8 // RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple -fmodule-file=a=%t/a.pcm %t/c.cpp -emit-llvm -disable-llvm-passes -o - | FileCheck %t/c.cpp
10 // Test again with reduced BMI
11 // RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple %t/a.cppm -emit-reduced-module-interface -o %t/a.pcm
12 // RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple -fmodule-file=a=%t/a.pcm %t/c.cpp -emit-llvm -disable-llvm-passes -o - | FileCheck %t/c.cpp
18 for (unsigned n = 0; n != 10; ++n) {
30 export template<typename T>
32 static constexpr auto a = f();
33 static constexpr auto b = f();
34 static constexpr auto c = f();
35 static constexpr auto d = f();
47 template struct s<int>;
48 template struct s<long>;
53 extern "C" int use() {
55 return _.a + _.b + _.c + _.d;
58 extern "C" long use2() {
63 extern "C" long use3() {
68 // CHECK: define{{.*}}@use(
72 // CHECK: declare{{.*}}@_ZNW1a1sIlE3fooEv
73 // CHECK-NOT: _ZNW1a1sIlE3barEv
74 // CHECK: declare{{.*}}_ZNW1a1sIlE3zooEv