xref: /aosp_15_r20/external/clang/test/Modules/exponential-paths.cpp (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // REQUIRES: shell
2*67e74705SXin Li //
3*67e74705SXin Li // RUN: rm -rf %t
4*67e74705SXin Li // RUN: mkdir %t
5*67e74705SXin Li //
6*67e74705SXin Li // Build module map with 40 modules; two layers with importing and re-exporting
7*67e74705SXin Li // the previous layer.
8*67e74705SXin Li //
9*67e74705SXin Li // RUN: echo 'module a0 { header "a0.h" export * }' > %t/module.modulemap
10*67e74705SXin Li // RUN: echo 'module b0 { header "b0.h" export * }' >> %t/module.modulemap
11*67e74705SXin Li // RUN: echo 'module a1 { header "a1.h" export * }' >> %t/module.modulemap
12*67e74705SXin Li // RUN: echo 'module b1 { header "b1.h" export * }' >> %t/module.modulemap
13*67e74705SXin Li // RUN: echo 'module a2 { header "a2.h" export * }' >> %t/module.modulemap
14*67e74705SXin Li // RUN: echo 'module b2 { header "b2.h" export * }' >> %t/module.modulemap
15*67e74705SXin Li // RUN: echo 'module a3 { header "a3.h" export * }' >> %t/module.modulemap
16*67e74705SXin Li // RUN: echo 'module b3 { header "b3.h" export * }' >> %t/module.modulemap
17*67e74705SXin Li // RUN: echo 'module a4 { header "a4.h" export * }' >> %t/module.modulemap
18*67e74705SXin Li // RUN: echo 'module b4 { header "b4.h" export * }' >> %t/module.modulemap
19*67e74705SXin Li // RUN: echo 'module a5 { header "a5.h" export * }' >> %t/module.modulemap
20*67e74705SXin Li // RUN: echo 'module b5 { header "b5.h" export * }' >> %t/module.modulemap
21*67e74705SXin Li // RUN: echo 'module a6 { header "a6.h" export * }' >> %t/module.modulemap
22*67e74705SXin Li // RUN: echo 'module b6 { header "b6.h" export * }' >> %t/module.modulemap
23*67e74705SXin Li // RUN: echo 'module a7 { header "a7.h" export * }' >> %t/module.modulemap
24*67e74705SXin Li // RUN: echo 'module b7 { header "b7.h" export * }' >> %t/module.modulemap
25*67e74705SXin Li // RUN: echo 'module a8 { header "a8.h" export * }' >> %t/module.modulemap
26*67e74705SXin Li // RUN: echo 'module b8 { header "b8.h" export * }' >> %t/module.modulemap
27*67e74705SXin Li // RUN: echo 'module a9 { header "a9.h" export * }' >> %t/module.modulemap
28*67e74705SXin Li // RUN: echo 'module b9 { header "b9.h" export * }' >> %t/module.modulemap
29*67e74705SXin Li // RUN: echo 'module a10 { header "a10.h" export * }' >> %t/module.modulemap
30*67e74705SXin Li // RUN: echo 'module b10 { header "b10.h" export * }' >> %t/module.modulemap
31*67e74705SXin Li // RUN: echo 'module a11 { header "a11.h" export * }' >> %t/module.modulemap
32*67e74705SXin Li // RUN: echo 'module b11 { header "b11.h" export * }' >> %t/module.modulemap
33*67e74705SXin Li // RUN: echo 'module a12 { header "a12.h" export * }' >> %t/module.modulemap
34*67e74705SXin Li // RUN: echo 'module b12 { header "b12.h" export * }' >> %t/module.modulemap
35*67e74705SXin Li // RUN: echo 'module a13 { header "a13.h" export * }' >> %t/module.modulemap
36*67e74705SXin Li // RUN: echo 'module b13 { header "b13.h" export * }' >> %t/module.modulemap
37*67e74705SXin Li // RUN: echo 'module a14 { header "a14.h" export * }' >> %t/module.modulemap
38*67e74705SXin Li // RUN: echo 'module b14 { header "b14.h" export * }' >> %t/module.modulemap
39*67e74705SXin Li // RUN: echo 'module a15 { header "a15.h" export * }' >> %t/module.modulemap
40*67e74705SXin Li // RUN: echo 'module b15 { header "b15.h" export * }' >> %t/module.modulemap
41*67e74705SXin Li // RUN: echo 'module a16 { header "a16.h" export * }' >> %t/module.modulemap
42*67e74705SXin Li // RUN: echo 'module b16 { header "b16.h" export * }' >> %t/module.modulemap
43*67e74705SXin Li // RUN: echo 'module a17 { header "a17.h" export * }' >> %t/module.modulemap
44*67e74705SXin Li // RUN: echo 'module b17 { header "b17.h" export * }' >> %t/module.modulemap
45*67e74705SXin Li // RUN: echo 'module a18 { header "a18.h" export * }' >> %t/module.modulemap
46*67e74705SXin Li // RUN: echo 'module b18 { header "b18.h" export * }' >> %t/module.modulemap
47*67e74705SXin Li // RUN: echo 'module a19 { header "a19.h" export * }' >> %t/module.modulemap
48*67e74705SXin Li // RUN: echo 'module b19 { header "b19.h" export * }' >> %t/module.modulemap
49*67e74705SXin Li // RUN: echo 'module a20 { header "a20.h" export * }' >> %t/module.modulemap
50*67e74705SXin Li // RUN: echo 'module b20 { header "b20.h" export * }' >> %t/module.modulemap
51*67e74705SXin Li //
52*67e74705SXin Li // Build the corresponding headers.
53*67e74705SXin Li //
54*67e74705SXin Li // RUN: echo 'template<int> struct X {}; extern X<0> x0;' > %t/x.h
55*67e74705SXin Li // RUN: echo 'extern int n;' > %t/a0.h
56*67e74705SXin Li // RUN: cp %t/a0.h %t/b0.h
57*67e74705SXin Li // RUN: echo '#include "x.h"' > %t/a1.h
58*67e74705SXin Li // RUN: echo '#include "a0.h"' >> %t/a1.h
59*67e74705SXin Li // RUN: echo '#include "b0.h"' >> %t/a1.h
60*67e74705SXin Li // RUN: cp %t/a1.h %t/b1.h
61*67e74705SXin Li // RUN: echo '#include "x.h"' > %t/a2.h
62*67e74705SXin Li // RUN: echo '#include "a1.h"' >> %t/a2.h
63*67e74705SXin Li // RUN: echo '#include "b1.h"' >> %t/a2.h
64*67e74705SXin Li // RUN: cp %t/a2.h %t/b2.h
65*67e74705SXin Li // RUN: echo '#include "x.h"' > %t/a3.h
66*67e74705SXin Li // RUN: echo '#include "a2.h"' >> %t/a3.h
67*67e74705SXin Li // RUN: echo '#include "b2.h"' >> %t/a3.h
68*67e74705SXin Li // RUN: cp %t/a3.h %t/b3.h
69*67e74705SXin Li // RUN: echo '#include "x.h"' > %t/a4.h
70*67e74705SXin Li // RUN: echo '#include "a3.h"' >> %t/a4.h
71*67e74705SXin Li // RUN: echo '#include "b3.h"' >> %t/a4.h
72*67e74705SXin Li // RUN: cp %t/a4.h %t/b4.h
73*67e74705SXin Li // RUN: echo '#include "x.h"' > %t/a5.h
74*67e74705SXin Li // RUN: echo '#include "a4.h"' >> %t/a5.h
75*67e74705SXin Li // RUN: echo '#include "b4.h"' >> %t/a5.h
76*67e74705SXin Li // RUN: cp %t/a5.h %t/b5.h
77*67e74705SXin Li // RUN: echo '#include "x.h"' > %t/a6.h
78*67e74705SXin Li // RUN: echo '#include "a5.h"' >> %t/a6.h
79*67e74705SXin Li // RUN: echo '#include "b5.h"' >> %t/a6.h
80*67e74705SXin Li // RUN: cp %t/a6.h %t/b6.h
81*67e74705SXin Li // RUN: echo '#include "x.h"' > %t/a7.h
82*67e74705SXin Li // RUN: echo '#include "a6.h"' >> %t/a7.h
83*67e74705SXin Li // RUN: echo '#include "b6.h"' >> %t/a7.h
84*67e74705SXin Li // RUN: cp %t/a7.h %t/b7.h
85*67e74705SXin Li // RUN: echo '#include "x.h"' > %t/a8.h
86*67e74705SXin Li // RUN: echo '#include "a7.h"' >> %t/a8.h
87*67e74705SXin Li // RUN: echo '#include "b7.h"' >> %t/a8.h
88*67e74705SXin Li // RUN: cp %t/a8.h %t/b8.h
89*67e74705SXin Li // RUN: echo '#include "x.h"' > %t/a9.h
90*67e74705SXin Li // RUN: echo '#include "a8.h"' >> %t/a9.h
91*67e74705SXin Li // RUN: echo '#include "b8.h"' >> %t/a9.h
92*67e74705SXin Li // RUN: cp %t/a9.h %t/b9.h
93*67e74705SXin Li // RUN: echo '#include "x.h"' > %t/a10.h
94*67e74705SXin Li // RUN: echo '#include "a9.h"' >> %t/a10.h
95*67e74705SXin Li // RUN: echo '#include "b9.h"' >> %t/a10.h
96*67e74705SXin Li // RUN: cp %t/a10.h %t/b10.h
97*67e74705SXin Li // RUN: echo '#include "x.h"' > %t/a11.h
98*67e74705SXin Li // RUN: echo '#include "a10.h"' >> %t/a11.h
99*67e74705SXin Li // RUN: echo '#include "b10.h"' >> %t/a11.h
100*67e74705SXin Li // RUN: cp %t/a11.h %t/b11.h
101*67e74705SXin Li // RUN: echo '#include "x.h"' > %t/a12.h
102*67e74705SXin Li // RUN: echo '#include "a11.h"' >> %t/a12.h
103*67e74705SXin Li // RUN: echo '#include "b11.h"' >> %t/a12.h
104*67e74705SXin Li // RUN: cp %t/a12.h %t/b12.h
105*67e74705SXin Li // RUN: echo '#include "x.h"' > %t/a13.h
106*67e74705SXin Li // RUN: echo '#include "a12.h"' >> %t/a13.h
107*67e74705SXin Li // RUN: echo '#include "b12.h"' >> %t/a13.h
108*67e74705SXin Li // RUN: cp %t/a13.h %t/b13.h
109*67e74705SXin Li // RUN: echo '#include "x.h"' > %t/a14.h
110*67e74705SXin Li // RUN: echo '#include "a13.h"' >> %t/a14.h
111*67e74705SXin Li // RUN: echo '#include "b13.h"' >> %t/a14.h
112*67e74705SXin Li // RUN: cp %t/a14.h %t/b14.h
113*67e74705SXin Li // RUN: echo '#include "x.h"' > %t/a15.h
114*67e74705SXin Li // RUN: echo '#include "a14.h"' >> %t/a15.h
115*67e74705SXin Li // RUN: echo '#include "b14.h"' >> %t/a15.h
116*67e74705SXin Li // RUN: cp %t/a15.h %t/b15.h
117*67e74705SXin Li // RUN: echo '#include "x.h"' > %t/a16.h
118*67e74705SXin Li // RUN: echo '#include "a15.h"' >> %t/a16.h
119*67e74705SXin Li // RUN: echo '#include "b15.h"' >> %t/a16.h
120*67e74705SXin Li // RUN: cp %t/a16.h %t/b16.h
121*67e74705SXin Li // RUN: echo '#include "x.h"' > %t/a17.h
122*67e74705SXin Li // RUN: echo '#include "a16.h"' >> %t/a17.h
123*67e74705SXin Li // RUN: echo '#include "b16.h"' >> %t/a17.h
124*67e74705SXin Li // RUN: cp %t/a17.h %t/b17.h
125*67e74705SXin Li // RUN: echo '#include "x.h"' > %t/a18.h
126*67e74705SXin Li // RUN: echo '#include "a17.h"' >> %t/a18.h
127*67e74705SXin Li // RUN: echo '#include "b17.h"' >> %t/a18.h
128*67e74705SXin Li // RUN: cp %t/a18.h %t/b18.h
129*67e74705SXin Li // RUN: echo '#include "x.h"' > %t/a19.h
130*67e74705SXin Li // RUN: echo '#include "a18.h"' >> %t/a19.h
131*67e74705SXin Li // RUN: echo '#include "b18.h"' >> %t/a19.h
132*67e74705SXin Li // RUN: cp %t/a19.h %t/b19.h
133*67e74705SXin Li // RUN: echo '#include "x.h"' > %t/a20.h
134*67e74705SXin Li // RUN: echo '#include "a19.h"' >> %t/a20.h
135*67e74705SXin Li // RUN: echo '#include "b19.h"' >> %t/a20.h
136*67e74705SXin Li // RUN: cp %t/a20.h %t/b20.h
137*67e74705SXin Li //
138*67e74705SXin Li // Explicitly build all the modules.
139*67e74705SXin Li //
140*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a0 -x c++ -emit-module %t/module.modulemap -o %t/a0.pcm
141*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b0 -x c++ -emit-module %t/module.modulemap -o %t/b0.pcm
142*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a1 -x c++ -emit-module %t/module.modulemap -o %t/a1.pcm -fmodule-file=%t/a0.pcm -fmodule-file=%t/b0.pcm
143*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b1 -x c++ -emit-module %t/module.modulemap -o %t/b1.pcm -fmodule-file=%t/a0.pcm -fmodule-file=%t/b0.pcm
144*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a2 -x c++ -emit-module %t/module.modulemap -o %t/a2.pcm -fmodule-file=%t/a1.pcm -fmodule-file=%t/b1.pcm
145*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b2 -x c++ -emit-module %t/module.modulemap -o %t/b2.pcm -fmodule-file=%t/a1.pcm -fmodule-file=%t/b1.pcm
146*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a3 -x c++ -emit-module %t/module.modulemap -o %t/a3.pcm -fmodule-file=%t/a2.pcm -fmodule-file=%t/b2.pcm
147*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b3 -x c++ -emit-module %t/module.modulemap -o %t/b3.pcm -fmodule-file=%t/a2.pcm -fmodule-file=%t/b2.pcm
148*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a4 -x c++ -emit-module %t/module.modulemap -o %t/a4.pcm -fmodule-file=%t/a3.pcm -fmodule-file=%t/b3.pcm
149*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b4 -x c++ -emit-module %t/module.modulemap -o %t/b4.pcm -fmodule-file=%t/a3.pcm -fmodule-file=%t/b3.pcm
150*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a5 -x c++ -emit-module %t/module.modulemap -o %t/a5.pcm -fmodule-file=%t/a4.pcm -fmodule-file=%t/b4.pcm
151*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b5 -x c++ -emit-module %t/module.modulemap -o %t/b5.pcm -fmodule-file=%t/a4.pcm -fmodule-file=%t/b4.pcm
152*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a6 -x c++ -emit-module %t/module.modulemap -o %t/a6.pcm -fmodule-file=%t/a5.pcm -fmodule-file=%t/b5.pcm
153*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b6 -x c++ -emit-module %t/module.modulemap -o %t/b6.pcm -fmodule-file=%t/a5.pcm -fmodule-file=%t/b5.pcm
154*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a7 -x c++ -emit-module %t/module.modulemap -o %t/a7.pcm -fmodule-file=%t/a6.pcm -fmodule-file=%t/b6.pcm
155*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b7 -x c++ -emit-module %t/module.modulemap -o %t/b7.pcm -fmodule-file=%t/a6.pcm -fmodule-file=%t/b6.pcm
156*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a8 -x c++ -emit-module %t/module.modulemap -o %t/a8.pcm -fmodule-file=%t/a7.pcm -fmodule-file=%t/b7.pcm
157*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b8 -x c++ -emit-module %t/module.modulemap -o %t/b8.pcm -fmodule-file=%t/a7.pcm -fmodule-file=%t/b7.pcm
158*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a9 -x c++ -emit-module %t/module.modulemap -o %t/a9.pcm -fmodule-file=%t/a8.pcm -fmodule-file=%t/b8.pcm
159*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b9 -x c++ -emit-module %t/module.modulemap -o %t/b9.pcm -fmodule-file=%t/a8.pcm -fmodule-file=%t/b8.pcm
160*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a10 -x c++ -emit-module %t/module.modulemap -o %t/a10.pcm -fmodule-file=%t/a9.pcm -fmodule-file=%t/b9.pcm
161*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b10 -x c++ -emit-module %t/module.modulemap -o %t/b10.pcm -fmodule-file=%t/a9.pcm -fmodule-file=%t/b9.pcm
162*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a11 -x c++ -emit-module %t/module.modulemap -o %t/a11.pcm -fmodule-file=%t/a10.pcm -fmodule-file=%t/b10.pcm
163*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b11 -x c++ -emit-module %t/module.modulemap -o %t/b11.pcm -fmodule-file=%t/a10.pcm -fmodule-file=%t/b10.pcm
164*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a12 -x c++ -emit-module %t/module.modulemap -o %t/a12.pcm -fmodule-file=%t/a11.pcm -fmodule-file=%t/b11.pcm
165*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b12 -x c++ -emit-module %t/module.modulemap -o %t/b12.pcm -fmodule-file=%t/a11.pcm -fmodule-file=%t/b11.pcm
166*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a13 -x c++ -emit-module %t/module.modulemap -o %t/a13.pcm -fmodule-file=%t/a12.pcm -fmodule-file=%t/b12.pcm
167*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b13 -x c++ -emit-module %t/module.modulemap -o %t/b13.pcm -fmodule-file=%t/a12.pcm -fmodule-file=%t/b12.pcm
168*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a14 -x c++ -emit-module %t/module.modulemap -o %t/a14.pcm -fmodule-file=%t/a13.pcm -fmodule-file=%t/b13.pcm
169*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b14 -x c++ -emit-module %t/module.modulemap -o %t/b14.pcm -fmodule-file=%t/a13.pcm -fmodule-file=%t/b13.pcm
170*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a15 -x c++ -emit-module %t/module.modulemap -o %t/a15.pcm -fmodule-file=%t/a14.pcm -fmodule-file=%t/b14.pcm
171*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b15 -x c++ -emit-module %t/module.modulemap -o %t/b15.pcm -fmodule-file=%t/a14.pcm -fmodule-file=%t/b14.pcm
172*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a16 -x c++ -emit-module %t/module.modulemap -o %t/a16.pcm -fmodule-file=%t/a15.pcm -fmodule-file=%t/b15.pcm
173*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b16 -x c++ -emit-module %t/module.modulemap -o %t/b16.pcm -fmodule-file=%t/a15.pcm -fmodule-file=%t/b15.pcm
174*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a17 -x c++ -emit-module %t/module.modulemap -o %t/a17.pcm -fmodule-file=%t/a16.pcm -fmodule-file=%t/b16.pcm
175*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b17 -x c++ -emit-module %t/module.modulemap -o %t/b17.pcm -fmodule-file=%t/a16.pcm -fmodule-file=%t/b16.pcm
176*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a18 -x c++ -emit-module %t/module.modulemap -o %t/a18.pcm -fmodule-file=%t/a17.pcm -fmodule-file=%t/b17.pcm
177*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b18 -x c++ -emit-module %t/module.modulemap -o %t/b18.pcm -fmodule-file=%t/a17.pcm -fmodule-file=%t/b17.pcm
178*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a19 -x c++ -emit-module %t/module.modulemap -o %t/a19.pcm -fmodule-file=%t/a18.pcm -fmodule-file=%t/b18.pcm
179*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b19 -x c++ -emit-module %t/module.modulemap -o %t/b19.pcm -fmodule-file=%t/a18.pcm -fmodule-file=%t/b18.pcm
180*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a20 -x c++ -emit-module %t/module.modulemap -o %t/a20.pcm -fmodule-file=%t/a19.pcm -fmodule-file=%t/b19.pcm
181*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b20 -x c++ -emit-module %t/module.modulemap -o %t/b20.pcm -fmodule-file=%t/a19.pcm -fmodule-file=%t/b19.pcm
182*67e74705SXin Li //
183*67e74705SXin Li // Build, using all the modules.
184*67e74705SXin Li // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fsyntax-only %s \
185*67e74705SXin Li // RUN:            -fmodule-file=%t/a0.pcm -fmodule-file=%t/b0.pcm \
186*67e74705SXin Li // RUN:            -fmodule-file=%t/a1.pcm -fmodule-file=%t/b1.pcm \
187*67e74705SXin Li // RUN:            -fmodule-file=%t/a2.pcm -fmodule-file=%t/b2.pcm \
188*67e74705SXin Li // RUN:            -fmodule-file=%t/a3.pcm -fmodule-file=%t/b3.pcm \
189*67e74705SXin Li // RUN:            -fmodule-file=%t/a4.pcm -fmodule-file=%t/b4.pcm \
190*67e74705SXin Li // RUN:            -fmodule-file=%t/a5.pcm -fmodule-file=%t/b5.pcm \
191*67e74705SXin Li // RUN:            -fmodule-file=%t/a6.pcm -fmodule-file=%t/b6.pcm \
192*67e74705SXin Li // RUN:            -fmodule-file=%t/a7.pcm -fmodule-file=%t/b7.pcm \
193*67e74705SXin Li // RUN:            -fmodule-file=%t/a8.pcm -fmodule-file=%t/b8.pcm \
194*67e74705SXin Li // RUN:            -fmodule-file=%t/a9.pcm -fmodule-file=%t/b9.pcm \
195*67e74705SXin Li // RUN:            -fmodule-file=%t/a10.pcm -fmodule-file=%t/b10.pcm \
196*67e74705SXin Li // RUN:            -fmodule-file=%t/a11.pcm -fmodule-file=%t/b11.pcm \
197*67e74705SXin Li // RUN:            -fmodule-file=%t/a12.pcm -fmodule-file=%t/b12.pcm \
198*67e74705SXin Li // RUN:            -fmodule-file=%t/a13.pcm -fmodule-file=%t/b13.pcm \
199*67e74705SXin Li // RUN:            -fmodule-file=%t/a14.pcm -fmodule-file=%t/b14.pcm \
200*67e74705SXin Li // RUN:            -fmodule-file=%t/a15.pcm -fmodule-file=%t/b15.pcm \
201*67e74705SXin Li // RUN:            -fmodule-file=%t/a16.pcm -fmodule-file=%t/b16.pcm \
202*67e74705SXin Li // RUN:            -fmodule-file=%t/a17.pcm -fmodule-file=%t/b17.pcm \
203*67e74705SXin Li // RUN:            -fmodule-file=%t/a18.pcm -fmodule-file=%t/b18.pcm \
204*67e74705SXin Li // RUN:            -fmodule-file=%t/a19.pcm -fmodule-file=%t/b19.pcm \
205*67e74705SXin Li // RUN:            -fmodule-file=%t/a20.pcm -fmodule-file=%t/b20.pcm
206*67e74705SXin Li 
207*67e74705SXin Li #include "a20.h"
208*67e74705SXin Li #include "b20.h"
209*67e74705SXin Li int k = n;
210