39 lines · plain
1// RUN: rm -rf %t2// RUN: split-file %s %t3// RUN: cd %t4//5// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++20 %t/a.cppm \6// RUN: -emit-module-interface -o %t/a.pcm7// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++20 %t/m.cppm \8// RUN: -emit-module-interface -fmodule-file=a=%t/a.pcm -o %t/m.pcm9// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++20 %t/m.pcm \10// RUN: -fmodule-file=a=%t/a.pcm -emit-llvm -o - | FileCheck %t/m.cppm11 12// Test again with reduced BMI.13// Note that we can't use reduced BMI here for m.cppm since it is required14// to generate the backend code.15// RUN: rm %t/a.pcm %t/m.pcm16// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++20 %t/a.cppm \17// RUN: -emit-reduced-module-interface -o %t/a.pcm18// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++20 %t/m.cppm \19// RUN: -emit-module-interface -fmodule-file=a=%t/a.pcm -o %t/m.pcm20// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++20 %t/m.pcm \21// RUN: -fmodule-file=a=%t/a.pcm -emit-llvm -o - | FileCheck %t/m.cppm22 23//--- a.cppm24export module a;25export struct A {26 A(){};27};28export A __dynamic_inited_a;29 30//--- m.cppm31export module m;32import a;33export import a;34 35 36// CHECK: define void @_ZGIW1m37// CHECK: store i8 1, ptr @_ZGIW1m__in_chrg38// CHECK: call{{.*}}@_ZGIW1a39