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/partition1.cpp \
|
|
6 // RUN: -o %t/A-Part1.pcm
|
|
7
|
|
8 // RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/partition2.cpp \
|
|
9 // RUN: -o %t/A-Part2.pcm
|
|
10
|
|
11 // RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/partition3.cpp \
|
|
12 // RUN: -o %t/A-Part3.pcm
|
|
13
|
|
14 // RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/moduleA.cpp \
|
|
15 // RUN: -fprebuilt-module-path=%t
|
|
16
|
|
17 // expected-no-diagnostics
|
|
18
|
|
19 //--- partition1.cpp
|
|
20 export module A:Part1;
|
|
21
|
|
22 int part1();
|
|
23
|
|
24 //--- partition2.cpp
|
|
25
|
|
26 export module A:Part2;
|
|
27
|
|
28 int part2();
|
|
29
|
|
30 //--- partition3.cpp
|
|
31
|
|
32 export module A:Part3;
|
|
33
|
|
34 int part3();
|
|
35
|
|
36 //--- moduleA.cpp
|
|
37
|
|
38 export module A;
|
|
39
|
|
40 import :Part1;
|
|
41 export import :Part2;
|
|
42 import :Part3;
|
|
43
|
|
44 int foo();
|