236
|
1 // RUN: rm -rf %t
|
|
2 // RUN: mkdir -p %t
|
|
3 // RUN: split-file %s %t
|
|
4
|
|
5 // RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/std10-3-ex1-tu1.cpp \
|
|
6 // RUN: -o %t/M_PartImpl.pcm
|
|
7
|
|
8 // RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/std10-3-ex1-tu2.cpp \
|
252
|
9 // RUN: -fmodule-file=M:PartImpl=%t/M_PartImpl.pcm -o %t/M.pcm -verify
|
236
|
10
|
|
11 // RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/std10-3-ex1-tu3.cpp \
|
|
12 // RUN: -o %t/M_Part.pcm
|
|
13
|
|
14 // RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/std10-3-ex1-tu4.cpp \
|
252
|
15 // RUN: -fmodule-file=M:Part=%t/M_Part.pcm -o %t/M.pcm
|
236
|
16
|
|
17 //--- std10-3-ex1-tu1.cpp
|
|
18 module M:PartImpl;
|
|
19
|
|
20 // expected-no-diagnostics
|
|
21
|
|
22 //--- std10-3-ex1-tu2.cpp
|
|
23 export module M;
|
|
24 // error: exported partition :Part is an implementation unit
|
|
25 export import :PartImpl; // expected-error {{module partition implementations cannot be exported}}
|
|
26
|
|
27 //--- std10-3-ex1-tu3.cpp
|
|
28 export module M:Part;
|
|
29
|
|
30 // expected-no-diagnostics
|
|
31
|
|
32 //--- std10-3-ex1-tu4.cpp
|
|
33 export module M;
|
|
34 export import :Part;
|
|
35
|
|
36 // expected-no-diagnostics
|