1// RUN: rm -rf %t 2// RUN: split-file %s %t 3// RUN: cd %t 4// 5// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++20 %t/a.cppm \ 6// RUN: -emit-module-interface -o %t/a.pcm 7// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++20 %t/m.cppm \ 8// RUN: -emit-module-interface -fprebuilt-module-path=%t -o %t/m.pcm 9// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++20 %t/m.pcm \ 10// RUN: -fprebuilt-module-path=%t -emit-llvm -o - | FileCheck %t/m.cppm 11 12// Test again with reduced BMI 13// 14// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++20 %t/a.cppm \ 15// RUN: -emit-reduced-module-interface -o %t/a.pcm 16// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++20 %t/m.cppm \ 17// RUN: -emit-reduced-module-interface -fprebuilt-module-path=%t -o %t/m.pcm 18// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++20 %t/m.pcm \ 19// RUN: -fprebuilt-module-path=%t -emit-llvm -o - | FileCheck %t/m.cppm 20 21//--- a.cppm 22export module a; 23export struct A { 24 A(){}; 25}; 26export A __dynamic_inited_a; 27 28//--- m.cppm 29module; 30import a; 31export module m; 32import a; 33module :private; 34import a; 35 36// CHECK: define void @_ZGIW1m 37// CHECK: store i8 1, ptr @_ZGIW1m__in_chrg 38// CHECK: call{{.*}}@_ZGIW1a 39