56 lines · cpp
1// RUN: rm -rf %t2// RUN: split-file %s %t3// RUN: cd %t4 5// RUN: %clang_cc1 -std=c++20 A-intf-part.cpp -emit-module-interface \6// RUN: -o A-PubPart.pcm7// RUN: %clang_cc1 -std=c++20 A-interface.cpp -emit-module-interface \8// RUN: -fmodule-file=A-PubPart.pcm -o A.pcm9 10// RUN: %clang_cc1 -std=c++20 A-impl-top.cpp -fsyntax-only -fprebuilt-module-path=%t11// RUN: %clang_cc1 -std=c++20 A-impl-part.cpp -fsyntax-only -fprebuilt-module-path=%t12// RUN: %clang_cc1 -std=c++20 A-impl-1.cpp -fsyntax-only -fprebuilt-module-path=%t13// RUN: %clang_cc1 -std=c++20 A-impl-2.cpp -fsyntax-only -fprebuilt-module-path=%t14 15//--- A-interface.cpp16export module A;17 18export import :PubPart;19 20export void do_something();21 22void helper1();23void helper3();24 25//--- A-intf-part.cpp26export module A:PubPart;27 28void helper2();29 30//--- A-impl-top.cpp31 32module A;33 34void do_something() {35 helper1();36 helper2();37 helper3();38}39 40//--- A-impl-part.cpp41module A:Secret;42 43import A;44 45void helper3() {}46 47//--- A-impl-1.cpp48module A;49 50void helper1() {}51 52//--- A-impl-2.cpp53module A;54 55void helper2() {}56