3 // RUN: split-file %s %t
5 // RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple %t/d.cppm \
6 // RUN: -emit-module-interface -o %t/d.pcm
7 // RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple %t/c.cppm \
8 // RUN: -emit-module-interface -o %t/c.pcm -fprebuilt-module-path=%t
9 // RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple %t/b.cppm \
10 // RUN: -emit-module-interface -o %t/b.pcm -fprebuilt-module-path=%t
11 // RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple %t/a.cppm \
12 // RUN: -emit-module-interface -o %t/a.pcm -fprebuilt-module-path=%t
13 // RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple %t/a.pcm \
14 // RUN: -emit-llvm -disable-llvm-passes -o - -fprebuilt-module-path=%t \
15 // RUN: | FileCheck %t/a.cppm
17 // Test again with reduced BMI.
20 // RUN: split-file %s %t
22 // RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple %t/d.cppm \
23 // RUN: -emit-reduced-module-interface -o %t/d.pcm
24 // RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple %t/c.cppm \
25 // RUN: -emit-reduced-module-interface -o %t/c.pcm -fprebuilt-module-path=%t
26 // RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple %t/b.cppm \
27 // RUN: -emit-reduced-module-interface -o %t/b.pcm -fprebuilt-module-path=%t
28 // RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple %t/a.cppm \
29 // RUN: -emit-module-interface -o %t/a.pcm -fprebuilt-module-path=%t
30 // RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple %t/a.pcm \
31 // RUN: -emit-llvm -disable-llvm-passes -o - -fprebuilt-module-path=%t \
32 // RUN: | FileCheck %t/a.cppm
37 export template<typename>
41 static constexpr auto value() {
45 friend constexpr void f(integer const x) {
50 export constexpr void ddd(auto const value) {
56 constexpr auto dd = T();
58 export template<typename T>
73 integer<int>().value();
93 d<integer<unsigned>>();
97 export extern "C" void a() {
101 // Checks that we emit the IR successfully.
102 // CHECK: define{{.*}}@a(