aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Headers/module.modulemap
blob: 56a13f69bc0559710e05406997a55e82e634e7d7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
/*===---- module.modulemap - intrinsics module map -------------------------===
 *
 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 * See https://llvm.org/LICENSE.txt for license information.
 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 *
 *===-----------------------------------------------------------------------===
 */

module _Builtin_intrinsics [system] [extern_c] {
  explicit module altivec {
    requires altivec
    header "altivec.h"
  }

  explicit module arm {
    requires arm

    explicit module acle {
      header "arm_acle.h"
      export *
    }

    explicit module neon {
      requires neon
      header "arm_neon.h"
      header "arm_fp16.h"
      export *
    }

    explicit module sve {
      requires sve
      header "arm_sve.h"
      export *
    }
  }

  explicit module intel {
    requires x86
    export *

    header "immintrin.h"
    textual header "f16cintrin.h"
    textual header "avxintrin.h"
    textual header "avx2intrin.h"
    textual header "avx512fintrin.h"
    textual header "avx512erintrin.h"
    textual header "fmaintrin.h"

    header "x86intrin.h"
    textual header "bmiintrin.h"
    textual header "bmi2intrin.h"
    textual header "lzcntintrin.h"
    textual header "xopintrin.h"
    textual header "fma4intrin.h"
    textual header "mwaitxintrin.h"
    textual header "clzerointrin.h"
    textual header "wbnoinvdintrin.h"
    textual header "cldemoteintrin.h"
    textual header "waitpkgintrin.h"
    textual header "movdirintrin.h"
    textual header "pconfigintrin.h"
    textual header "sgxintrin.h"
    textual header "ptwriteintrin.h"
    textual header "invpcidintrin.h"

    textual header "__wmmintrin_aes.h"
    textual header "__wmmintrin_pclmul.h"

    explicit module mm_malloc {
      requires !freestanding
      header "mm_malloc.h"
      export * // note: for <stdlib.h> dependency
    }

    explicit module cpuid {
      requires gnuinlineasm
      header "cpuid.h"
    }

    explicit module mmx {
      header "mmintrin.h"
    }

    explicit module sse {
      export mm_malloc
      export mmx
      export sse2 // note: for hackish <emmintrin.h> dependency
      header "xmmintrin.h"
    }

    explicit module sse2 {
      export sse
      header "emmintrin.h"
    }

    explicit module sse3 {
      export sse2
      header "pmmintrin.h"
    }

    explicit module ssse3 {
      export sse3
      header "tmmintrin.h"
    }

    explicit module sse4_1 {
      export ssse3
      header "smmintrin.h"
    }

    explicit module sse4_2 {
      export sse4_1
      header "nmmintrin.h"
    }

    explicit module sse4a {
      export sse3
      header "ammintrin.h"
    }

    explicit module popcnt {
      header "popcntintrin.h"
    }

    explicit module mm3dnow {
      header "mm3dnow.h"
    }

    explicit module aes_pclmul {
      header "wmmintrin.h"
      export aes
      export pclmul
    }
  }

  explicit module systemz {
    requires systemz
    export *

    header "s390intrin.h"

    explicit module htm {
      requires htm
      header "htmintrin.h"
      header "htmxlintrin.h"
    }

    explicit module zvector {
      requires zvector, vx
      header "vecintrin.h"
    }
  }
}

// Start -fbuiltin-headers-in-system-modules affected modules

// The following modules all ignore their headers when
// -fbuiltin-headers-in-system-modules is passed, and many of
// those headers join system modules when present.

// e.g. if -fbuiltin-headers-in-system-modules is passed, then
// float.h will not be in the _Builtin_float module (that module
// will be empty). If there is a system module that declares
// `header "float.h"`, then the builtin float.h will join
// that module. The system float.h (if present) will be treated
// as a textual header in the sytem module.
module _Builtin_float [system] {
  header "float.h"
  export *
}

module _Builtin_inttypes [system] {
  header "inttypes.h"
  export *
}

module _Builtin_iso646 [system] {
  header "iso646.h"
  export *
}

module _Builtin_limits [system] {
  header "limits.h"
  export *
}

module _Builtin_stdalign [system] {
  header "stdalign.h"
  export *
}

module _Builtin_stdarg [system] {
  textual header "stdarg.h"

  explicit module __gnuc_va_list {
    header "__stdarg___gnuc_va_list.h"
    export *
  }

  explicit module __va_copy {
    header "__stdarg___va_copy.h"
    export *
  }

  explicit module va_arg {
    header "__stdarg_va_arg.h"
    export *
  }

  explicit module va_copy {
    header "__stdarg_va_copy.h"
    export *
  }

  explicit module va_list {
    header "__stdarg_va_list.h"
    export *
  }
}

module _Builtin_stdatomic [system] {
  header "stdatomic.h"
  export *
}

module _Builtin_stdbool [system] {
  header "stdbool.h"
  export *
}

module _Builtin_stddef [system] {
  textual header "stddef.h"

  // __stddef_max_align_t.h is always in this module, even if
  // -fbuiltin-headers-in-system-modules is passed.
  explicit module max_align_t {
    header "__stddef_max_align_t.h"
    export *
  }

  explicit module null {
    header "__stddef_null.h"
    export *
  }

  explicit module nullptr_t {
    header "__stddef_nullptr_t.h"
    export *
  }

  explicit module offsetof {
    header "__stddef_offsetof.h"
    export *
  }

  explicit module ptrdiff_t {
    header "__stddef_ptrdiff_t.h"
    export *
  }

  explicit module rsize_t {
    header "__stddef_rsize_t.h"
    export *
  }

  explicit module size_t {
    header "__stddef_size_t.h"
    export *
  }

  explicit module unreachable {
    header "__stddef_unreachable.h"
    export *
  }

  explicit module wchar_t {
    header "__stddef_wchar_t.h"
    export *
  }
}

// wint_t is provided by <wchar.h> and not <stddef.h>. It's here
// for compatibility, but must be explicitly requested. Therefore
// __stddef_wint_t.h is not part of _Builtin_stddef. It is always in
// this module even if -fbuiltin-headers-in-system-modules is passed.
module _Builtin_stddef_wint_t [system] {
  header "__stddef_wint_t.h"
  export *
}

module _Builtin_stdint [system] {
  header "stdint.h"
  export *
}

module _Builtin_stdnoreturn [system] {
  header "stdnoreturn.h"
  export *
}

module _Builtin_tgmath [system] {
  header "tgmath.h"
  export *
}

module _Builtin_unwind [system] {
  header "unwind.h"
  export *
}
// End -fbuiltin-headers-in-system-modules affected modules

module opencl_c {
  requires opencl
  header "opencl-c.h"
  header "opencl-c-base.h"
}