1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 // Test that we can include each header in a TU while using modules.
10 // This is important notably because the LLDB data formatters use
11 // libc++ headers with modules enabled.
12 
13 // The system-provided <uchar.h> seems to be broken on AIX
14 // XFAIL: LIBCXX-AIX-FIXME
15 
16 // GCC doesn't support -fcxx-modules
17 // UNSUPPORTED: gcc
18 
19 // The Windows headers don't appear to be compatible with modules
20 // UNSUPPORTED: windows
21 
22 // Prevent <ext/hash_map> from generating deprecated warnings for this test.
23 #if defined(__DEPRECATED)
24 #    undef __DEPRECATED
25 #endif
26 
27 #include <__config>
28 
29 /*
30 BEGIN-SCRIPT
31 
32 for i, header in enumerate(public_headers):
33   print("// {}: %{{cxx}} %s %{{flags}} %{{compile_flags}} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_{}".format('RUN', i))
34   if header in header_restrictions:
35     print("#if defined(TEST_{}) && {}".format(i, header_restrictions[header]))
36   else:
37     print("#if defined(TEST_{})".format(i))
38   print("#include <{}>".format(header))
39   print("#endif")
40 
41 END-SCRIPT
42 */
43 
44 // RUN: rm -rf %t
45 // RUN: mkdir %t
46 
47 // DO NOT MANUALLY EDIT ANYTHING BETWEEN THE MARKERS BELOW
48 // GENERATED-MARKER
49 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_0
50 #if defined(TEST_0)
51 #include <algorithm>
52 #endif
53 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_1
54 #if defined(TEST_1)
55 #include <any>
56 #endif
57 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_2
58 #if defined(TEST_2)
59 #include <array>
60 #endif
61 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_3
62 #if defined(TEST_3)
63 #include <atomic>
64 #endif
65 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_4
66 #if defined(TEST_4) && !defined(_LIBCPP_HAS_NO_THREADS)
67 #include <barrier>
68 #endif
69 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_5
70 #if defined(TEST_5)
71 #include <bit>
72 #endif
73 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_6
74 #if defined(TEST_6)
75 #include <bitset>
76 #endif
77 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_7
78 #if defined(TEST_7)
79 #include <cassert>
80 #endif
81 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_8
82 #if defined(TEST_8)
83 #include <ccomplex>
84 #endif
85 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_9
86 #if defined(TEST_9)
87 #include <cctype>
88 #endif
89 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_10
90 #if defined(TEST_10)
91 #include <cerrno>
92 #endif
93 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_11
94 #if defined(TEST_11)
95 #include <cfenv>
96 #endif
97 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_12
98 #if defined(TEST_12)
99 #include <cfloat>
100 #endif
101 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_13
102 #if defined(TEST_13)
103 #include <charconv>
104 #endif
105 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_14
106 #if defined(TEST_14)
107 #include <chrono>
108 #endif
109 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_15
110 #if defined(TEST_15)
111 #include <cinttypes>
112 #endif
113 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_16
114 #if defined(TEST_16)
115 #include <ciso646>
116 #endif
117 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_17
118 #if defined(TEST_17)
119 #include <climits>
120 #endif
121 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_18
122 #if defined(TEST_18) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
123 #include <clocale>
124 #endif
125 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_19
126 #if defined(TEST_19)
127 #include <cmath>
128 #endif
129 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_20
130 #if defined(TEST_20) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
131 #include <codecvt>
132 #endif
133 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_21
134 #if defined(TEST_21)
135 #include <compare>
136 #endif
137 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_22
138 #if defined(TEST_22)
139 #include <complex>
140 #endif
141 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_23
142 #if defined(TEST_23)
143 #include <complex.h>
144 #endif
145 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_24
146 #if defined(TEST_24)
147 #include <concepts>
148 #endif
149 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_25
150 #if defined(TEST_25)
151 #include <condition_variable>
152 #endif
153 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_26
154 #if defined(TEST_26)
155 #include <coroutine>
156 #endif
157 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_27
158 #if defined(TEST_27)
159 #include <csetjmp>
160 #endif
161 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_28
162 #if defined(TEST_28)
163 #include <csignal>
164 #endif
165 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_29
166 #if defined(TEST_29)
167 #include <cstdarg>
168 #endif
169 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_30
170 #if defined(TEST_30)
171 #include <cstdbool>
172 #endif
173 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_31
174 #if defined(TEST_31)
175 #include <cstddef>
176 #endif
177 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_32
178 #if defined(TEST_32)
179 #include <cstdint>
180 #endif
181 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_33
182 #if defined(TEST_33)
183 #include <cstdio>
184 #endif
185 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_34
186 #if defined(TEST_34)
187 #include <cstdlib>
188 #endif
189 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_35
190 #if defined(TEST_35)
191 #include <cstring>
192 #endif
193 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_36
194 #if defined(TEST_36)
195 #include <ctgmath>
196 #endif
197 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_37
198 #if defined(TEST_37)
199 #include <ctime>
200 #endif
201 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_38
202 #if defined(TEST_38)
203 #include <ctype.h>
204 #endif
205 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_39
206 #if defined(TEST_39)
207 #include <cuchar>
208 #endif
209 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_40
210 #if defined(TEST_40) && !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
211 #include <cwchar>
212 #endif
213 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_41
214 #if defined(TEST_41) && !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
215 #include <cwctype>
216 #endif
217 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_42
218 #if defined(TEST_42)
219 #include <deque>
220 #endif
221 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_43
222 #if defined(TEST_43)
223 #include <errno.h>
224 #endif
225 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_44
226 #if defined(TEST_44)
227 #include <exception>
228 #endif
229 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_45
230 #if defined(TEST_45)
231 #include <execution>
232 #endif
233 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_46
234 #if defined(TEST_46)
235 #include <fenv.h>
236 #endif
237 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_47
238 #if defined(TEST_47) && !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
239 #include <filesystem>
240 #endif
241 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_48
242 #if defined(TEST_48)
243 #include <float.h>
244 #endif
245 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_49
246 #if defined(TEST_49)
247 #include <format>
248 #endif
249 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_50
250 #if defined(TEST_50)
251 #include <forward_list>
252 #endif
253 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_51
254 #if defined(TEST_51) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
255 #include <fstream>
256 #endif
257 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_52
258 #if defined(TEST_52)
259 #include <functional>
260 #endif
261 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_53
262 #if defined(TEST_53) && !defined(_LIBCPP_HAS_NO_THREADS)
263 #include <future>
264 #endif
265 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_54
266 #if defined(TEST_54)
267 #include <initializer_list>
268 #endif
269 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_55
270 #if defined(TEST_55)
271 #include <inttypes.h>
272 #endif
273 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_56
274 #if defined(TEST_56) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
275 #include <iomanip>
276 #endif
277 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_57
278 #if defined(TEST_57) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
279 #include <ios>
280 #endif
281 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_58
282 #if defined(TEST_58)
283 #include <iosfwd>
284 #endif
285 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_59
286 #if defined(TEST_59) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
287 #include <iostream>
288 #endif
289 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_60
290 #if defined(TEST_60) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
291 #include <istream>
292 #endif
293 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_61
294 #if defined(TEST_61)
295 #include <iterator>
296 #endif
297 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_62
298 #if defined(TEST_62) && !defined(_LIBCPP_HAS_NO_THREADS)
299 #include <latch>
300 #endif
301 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_63
302 #if defined(TEST_63)
303 #include <limits>
304 #endif
305 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_64
306 #if defined(TEST_64)
307 #include <limits.h>
308 #endif
309 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_65
310 #if defined(TEST_65)
311 #include <list>
312 #endif
313 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_66
314 #if defined(TEST_66) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
315 #include <locale>
316 #endif
317 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_67
318 #if defined(TEST_67) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
319 #include <locale.h>
320 #endif
321 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_68
322 #if defined(TEST_68)
323 #include <map>
324 #endif
325 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_69
326 #if defined(TEST_69)
327 #include <math.h>
328 #endif
329 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_70
330 #if defined(TEST_70)
331 #include <memory>
332 #endif
333 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_71
334 #if defined(TEST_71) && !defined(_LIBCPP_HAS_NO_THREADS)
335 #include <mutex>
336 #endif
337 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_72
338 #if defined(TEST_72)
339 #include <new>
340 #endif
341 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_73
342 #if defined(TEST_73)
343 #include <numbers>
344 #endif
345 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_74
346 #if defined(TEST_74)
347 #include <numeric>
348 #endif
349 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_75
350 #if defined(TEST_75)
351 #include <optional>
352 #endif
353 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_76
354 #if defined(TEST_76) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
355 #include <ostream>
356 #endif
357 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_77
358 #if defined(TEST_77)
359 #include <queue>
360 #endif
361 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_78
362 #if defined(TEST_78)
363 #include <random>
364 #endif
365 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_79
366 #if defined(TEST_79)
367 #include <ranges>
368 #endif
369 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_80
370 #if defined(TEST_80)
371 #include <ratio>
372 #endif
373 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_81
374 #if defined(TEST_81) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
375 #include <regex>
376 #endif
377 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_82
378 #if defined(TEST_82)
379 #include <scoped_allocator>
380 #endif
381 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_83
382 #if defined(TEST_83) && !defined(_LIBCPP_HAS_NO_THREADS)
383 #include <semaphore>
384 #endif
385 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_84
386 #if defined(TEST_84)
387 #include <set>
388 #endif
389 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_85
390 #if defined(TEST_85)
391 #include <setjmp.h>
392 #endif
393 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_86
394 #if defined(TEST_86) && !defined(_LIBCPP_HAS_NO_THREADS)
395 #include <shared_mutex>
396 #endif
397 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_87
398 #if defined(TEST_87)
399 #include <span>
400 #endif
401 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_88
402 #if defined(TEST_88) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
403 #include <sstream>
404 #endif
405 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_89
406 #if defined(TEST_89)
407 #include <stack>
408 #endif
409 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_90
410 #if defined(TEST_90) && __cplusplus > 202002L && !defined(_LIBCPP_HAS_NO_THREADS)
411 #include <stdatomic.h>
412 #endif
413 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_91
414 #if defined(TEST_91)
415 #include <stdbool.h>
416 #endif
417 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_92
418 #if defined(TEST_92)
419 #include <stddef.h>
420 #endif
421 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_93
422 #if defined(TEST_93)
423 #include <stdexcept>
424 #endif
425 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_94
426 #if defined(TEST_94)
427 #include <stdint.h>
428 #endif
429 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_95
430 #if defined(TEST_95)
431 #include <stdio.h>
432 #endif
433 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_96
434 #if defined(TEST_96)
435 #include <stdlib.h>
436 #endif
437 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_97
438 #if defined(TEST_97) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
439 #include <streambuf>
440 #endif
441 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_98
442 #if defined(TEST_98)
443 #include <string>
444 #endif
445 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_99
446 #if defined(TEST_99)
447 #include <string.h>
448 #endif
449 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_100
450 #if defined(TEST_100)
451 #include <string_view>
452 #endif
453 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_101
454 #if defined(TEST_101) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
455 #include <strstream>
456 #endif
457 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_102
458 #if defined(TEST_102)
459 #include <system_error>
460 #endif
461 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_103
462 #if defined(TEST_103)
463 #include <tgmath.h>
464 #endif
465 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_104
466 #if defined(TEST_104) && !defined(_LIBCPP_HAS_NO_THREADS)
467 #include <thread>
468 #endif
469 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_105
470 #if defined(TEST_105)
471 #include <tuple>
472 #endif
473 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_106
474 #if defined(TEST_106)
475 #include <type_traits>
476 #endif
477 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_107
478 #if defined(TEST_107)
479 #include <typeindex>
480 #endif
481 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_108
482 #if defined(TEST_108)
483 #include <typeinfo>
484 #endif
485 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_109
486 #if defined(TEST_109)
487 #include <uchar.h>
488 #endif
489 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_110
490 #if defined(TEST_110)
491 #include <unordered_map>
492 #endif
493 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_111
494 #if defined(TEST_111)
495 #include <unordered_set>
496 #endif
497 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_112
498 #if defined(TEST_112)
499 #include <utility>
500 #endif
501 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_113
502 #if defined(TEST_113)
503 #include <valarray>
504 #endif
505 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_114
506 #if defined(TEST_114)
507 #include <variant>
508 #endif
509 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_115
510 #if defined(TEST_115)
511 #include <vector>
512 #endif
513 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_116
514 #if defined(TEST_116)
515 #include <version>
516 #endif
517 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_117
518 #if defined(TEST_117) && !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
519 #include <wchar.h>
520 #endif
521 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_118
522 #if defined(TEST_118) && !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
523 #include <wctype.h>
524 #endif
525 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_119
526 #if defined(TEST_119) && __cplusplus >= 201103L
527 #include <experimental/algorithm>
528 #endif
529 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_120
530 #if defined(TEST_120) && __cplusplus >= 201103L && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_COROUTINES)
531 #include <experimental/coroutine>
532 #endif
533 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_121
534 #if defined(TEST_121) && __cplusplus >= 201103L
535 #include <experimental/deque>
536 #endif
537 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_122
538 #if defined(TEST_122) && __cplusplus >= 201103L
539 #include <experimental/forward_list>
540 #endif
541 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_123
542 #if defined(TEST_123) && __cplusplus >= 201103L
543 #include <experimental/functional>
544 #endif
545 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_124
546 #if defined(TEST_124) && __cplusplus >= 201103L
547 #include <experimental/iterator>
548 #endif
549 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_125
550 #if defined(TEST_125) && __cplusplus >= 201103L
551 #include <experimental/list>
552 #endif
553 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_126
554 #if defined(TEST_126) && __cplusplus >= 201103L
555 #include <experimental/map>
556 #endif
557 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_127
558 #if defined(TEST_127) && __cplusplus >= 201103L
559 #include <experimental/memory_resource>
560 #endif
561 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_128
562 #if defined(TEST_128) && __cplusplus >= 201103L
563 #include <experimental/propagate_const>
564 #endif
565 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_129
566 #if defined(TEST_129) && !defined(_LIBCPP_HAS_NO_LOCALIZATION) && __cplusplus >= 201103L
567 #include <experimental/regex>
568 #endif
569 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_130
570 #if defined(TEST_130) && __cplusplus >= 201103L
571 #include <experimental/set>
572 #endif
573 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_131
574 #if defined(TEST_131) && __cplusplus >= 201103L
575 #include <experimental/simd>
576 #endif
577 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_132
578 #if defined(TEST_132) && __cplusplus >= 201103L
579 #include <experimental/string>
580 #endif
581 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_133
582 #if defined(TEST_133) && __cplusplus >= 201103L
583 #include <experimental/type_traits>
584 #endif
585 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_134
586 #if defined(TEST_134) && __cplusplus >= 201103L
587 #include <experimental/unordered_map>
588 #endif
589 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_135
590 #if defined(TEST_135) && __cplusplus >= 201103L
591 #include <experimental/unordered_set>
592 #endif
593 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_136
594 #if defined(TEST_136) && __cplusplus >= 201103L
595 #include <experimental/utility>
596 #endif
597 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_137
598 #if defined(TEST_137) && __cplusplus >= 201103L
599 #include <experimental/vector>
600 #endif
601 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_138
602 #if defined(TEST_138)
603 #include <ext/hash_map>
604 #endif
605 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_139
606 #if defined(TEST_139)
607 #include <ext/hash_set>
608 #endif
609 // GENERATED-MARKER
610