3 // RUN: split-file %s %t
5 // RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/std10-3-ex1-tu1.cpp \
6 // RUN: -o %t/M_PartImpl.pcm
8 // RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/std10-3-ex1-tu2.cpp \
9 // RUN: -fmodule-file=M:PartImpl=%t/M_PartImpl.pcm -o %t/M.pcm -verify
11 // RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/std10-3-ex1-tu3.cpp \
12 // RUN: -o %t/M_Part.pcm
14 // RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/std10-3-ex1-tu4.cpp \
15 // RUN: -fmodule-file=M:Part=%t/M_Part.pcm -o %t/M.pcm
17 // Test again with reduced BMI.
18 // RUN: rm %t/M_PartImpl.pcm %t/M.pcm %t/M_Part.pcm
19 // RUN: %clang_cc1 -std=c++20 -emit-reduced-module-interface %t/std10-3-ex1-tu1.cpp \
20 // RUN: -o %t/M_PartImpl.pcm
22 // RUN: %clang_cc1 -std=c++20 -emit-reduced-module-interface %t/std10-3-ex1-tu2.cpp \
23 // RUN: -fmodule-file=M:PartImpl=%t/M_PartImpl.pcm -o %t/M.pcm -verify
25 // RUN: %clang_cc1 -std=c++20 -emit-reduced-module-interface %t/std10-3-ex1-tu3.cpp \
26 // RUN: -o %t/M_Part.pcm
28 // RUN: %clang_cc1 -std=c++20 -emit-reduced-module-interface %t/std10-3-ex1-tu4.cpp \
29 // RUN: -fmodule-file=M:Part=%t/M_Part.pcm -o %t/M.pcm
31 //--- std10-3-ex1-tu1.cpp
34 // expected-no-diagnostics
36 //--- std10-3-ex1-tu2.cpp
38 // error: exported partition :Part is an implementation unit
39 export import
:PartImpl
; // expected-error {{module partition implementations cannot be exported}}
40 // expected-warning@-1 {{importing an implementation partition unit in a module interface is not recommended.}}
42 //--- std10-3-ex1-tu3.cpp
45 // expected-no-diagnostics
47 //--- std10-3-ex1-tu4.cpp
51 // expected-no-diagnostics