xref: /freebsd/contrib/llvm-project/llvm/include/module.modulemap (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
1module LLVM_C {
2  umbrella "llvm-c"
3  module * { export * }
4}
5
6module LLVM_Analysis {
7  requires cplusplus
8  umbrella "llvm/Analysis"
9  module * { export * }
10
11  // This is intended for (repeated) textual inclusion.
12  textual header "llvm/Analysis/ScalarFuncs.def"
13  textual header "llvm/Analysis/TargetLibraryInfo.def"
14  textual header "llvm/Analysis/VecFuncs.def"
15}
16
17module LLVM_AsmParser {
18  requires cplusplus
19  umbrella "llvm/AsmParser"
20  module * { export * }
21}
22
23module LLVM_CodeGenTypes {
24  requires cplusplus
25
26  module LLT {
27    header "llvm/CodeGenTypes/LowLevelType.h" export *
28  }
29  module MVT {
30    header "llvm/CodeGenTypes/MachineValueType.h" export *
31    extern module LLVM_Extern_CodeGenTypes_Gen "module.extern.modulemap"
32  }
33}
34
35// A module covering CodeGen/ and Target/. These are intertwined
36// and codependent, and thus notionally form a single module.
37module LLVM_Backend {
38  requires cplusplus
39
40  module CodeGen {
41    umbrella "llvm/CodeGen"
42    module * { export * }
43
44    // Exclude these; they're intended to be included into only a single
45    // translation unit (or none) and aren't part of this module.
46    exclude header "llvm/CodeGen/LinkAllAsmWriterComponents.h"
47    exclude header "llvm/CodeGen/LinkAllCodegenComponents.h"
48
49    // These are intended for (repeated) textual inclusion.
50    textual header "llvm/CodeGen/DIEValue.def"
51  }
52}
53
54// FIXME: Make this as a submodule of LLVM_Backend again.
55//        Doing so causes a linker error in clang-format.
56module LLVM_Backend_Target {
57  umbrella "llvm/Target"
58  module * { export * }
59}
60
61module LLVM_Bitcode {
62 requires cplusplus
63 umbrella "llvm/Bitcode"
64 module * { export * }
65}
66
67module LLVM_Bitstream {
68 requires cplusplus
69 umbrella "llvm/Bitstream"
70 module * { export * }
71}
72
73module LLVM_BinaryFormat {
74    requires cplusplus
75    umbrella "llvm/BinaryFormat" module * { export * }
76    textual header "llvm/BinaryFormat/Dwarf.def"
77    textual header "llvm/BinaryFormat/DXContainerConstants.def"
78    textual header "llvm/BinaryFormat/DynamicTags.def"
79    textual header "llvm/BinaryFormat/MachO.def"
80    textual header "llvm/BinaryFormat/MinidumpConstants.def"
81    textual header "llvm/BinaryFormat/Swift.def"
82    textual header "llvm/BinaryFormat/ELFRelocs/AArch64.def"
83    textual header "llvm/BinaryFormat/ELFRelocs/AMDGPU.def"
84    textual header "llvm/BinaryFormat/ELFRelocs/ARM.def"
85    textual header "llvm/BinaryFormat/ELFRelocs/ARC.def"
86    textual header "llvm/BinaryFormat/ELFRelocs/AVR.def"
87    textual header "llvm/BinaryFormat/ELFRelocs/BPF.def"
88    textual header "llvm/BinaryFormat/ELFRelocs/CSKY.def"
89    textual header "llvm/BinaryFormat/ELFRelocs/Hexagon.def"
90    textual header "llvm/BinaryFormat/ELFRelocs/i386.def"
91    textual header "llvm/BinaryFormat/ELFRelocs/Lanai.def"
92    textual header "llvm/BinaryFormat/ELFRelocs/LoongArch.def"
93    textual header "llvm/BinaryFormat/ELFRelocs/M68k.def"
94    textual header "llvm/BinaryFormat/ELFRelocs/Mips.def"
95    textual header "llvm/BinaryFormat/ELFRelocs/MSP430.def"
96    textual header "llvm/BinaryFormat/ELFRelocs/PowerPC64.def"
97    textual header "llvm/BinaryFormat/ELFRelocs/PowerPC.def"
98    textual header "llvm/BinaryFormat/ELFRelocs/RISCV.def"
99    textual header "llvm/BinaryFormat/ELFRelocs/Sparc.def"
100    textual header "llvm/BinaryFormat/ELFRelocs/SystemZ.def"
101    textual header "llvm/BinaryFormat/ELFRelocs/VE.def"
102    textual header "llvm/BinaryFormat/ELFRelocs/x86_64.def"
103    textual header "llvm/BinaryFormat/ELFRelocs/Xtensa.def"
104    textual header "llvm/BinaryFormat/WasmRelocs.def"
105    textual header "llvm/BinaryFormat/MsgPack.def"
106}
107
108module LLVM_Config {
109  requires cplusplus
110  umbrella "llvm/Config"
111  extern module LLVM_Extern_Config_Def "module.extern.modulemap"
112  module * { export * }
113}
114
115module LLVM_DebugInfo {
116  requires cplusplus
117  module DIContext { header "llvm/DebugInfo/DIContext.h" export * }
118}
119
120module LLVM_DebugInfo_DWARF {
121  requires cplusplus
122
123  umbrella "llvm/DebugInfo/DWARF"
124  module * { export * }
125}
126
127module LLVM_DebugInfo_PDB {
128  requires cplusplus
129
130  umbrella "llvm/DebugInfo/PDB"
131  module * { export * }
132
133  // Separate out this subdirectory; it's an optional component that depends on
134  // a separate library which might not be available.
135  //
136  // FIXME: There should be a better way to specify this.
137  exclude header "llvm/DebugInfo/PDB/DIA/DIADataStream.h"
138  exclude header "llvm/DebugInfo/PDB/DIA/DIAEnumDebugStreams.h"
139  exclude header "llvm/DebugInfo/PDB/DIA/DIAEnumFrameData.h"
140  exclude header "llvm/DebugInfo/PDB/DIA/DIAEnumInjectedSources.h"
141  exclude header "llvm/DebugInfo/PDB/DIA/DIAEnumLineNumbers.h"
142  exclude header "llvm/DebugInfo/PDB/DIA/DIAEnumSectionContribs.h"
143  exclude header "llvm/DebugInfo/PDB/DIA/DIAEnumSourceFiles.h"
144  exclude header "llvm/DebugInfo/PDB/DIA/DIAEnumSymbols.h"
145  exclude header "llvm/DebugInfo/PDB/DIA/DIAEnumTables.h"
146  exclude header "llvm/DebugInfo/PDB/DIA/DIAError.h"
147  exclude header "llvm/DebugInfo/PDB/DIA/DIAFrameData.h"
148  exclude header "llvm/DebugInfo/PDB/DIA/DIAInjectedSource.h"
149  exclude header "llvm/DebugInfo/PDB/DIA/DIALineNumber.h"
150  exclude header "llvm/DebugInfo/PDB/DIA/DIARawSymbol.h"
151  exclude header "llvm/DebugInfo/PDB/DIA/DIASectionContrib.h"
152  exclude header "llvm/DebugInfo/PDB/DIA/DIASession.h"
153  exclude header "llvm/DebugInfo/PDB/DIA/DIASourceFile.h"
154  exclude header "llvm/DebugInfo/PDB/DIA/DIASupport.h"
155  exclude header "llvm/DebugInfo/PDB/DIA/DIATable.h"
156  exclude header "llvm/DebugInfo/PDB/DIA/DIAUtils.h"
157}
158
159module LLVM_DebugInfo_PDB_DIA {
160  requires cplusplus
161
162  umbrella "llvm/DebugInfo/PDB/DIA"
163  module * { export * }
164}
165
166module LLVM_DebugInfo_MSF {
167  requires cplusplus
168
169  umbrella "llvm/DebugInfo/MSF"
170  module * { export * }
171}
172
173module LLVM_DebugInfo_CodeView {
174  requires cplusplus
175
176  umbrella "llvm/DebugInfo/CodeView"
177  module * { export * }
178
179  // These are intended for (repeated) textual inclusion.
180  textual header "llvm/DebugInfo/CodeView/CodeViewRegisters.def"
181  textual header "llvm/DebugInfo/CodeView/CodeViewTypes.def"
182  textual header "llvm/DebugInfo/CodeView/CodeViewSymbols.def"
183}
184
185module LLVM_DWARFLinker {
186  requires cplusplus
187
188  umbrella "llvm/DWARFLinker"
189  module * { export * }
190}
191
192module LLVM_ExecutionEngine {
193  requires cplusplus
194
195  umbrella "llvm/ExecutionEngine"
196  module * { export * }
197
198  // Exclude this; it's an optional component of the ExecutionEngine.
199  exclude header "llvm/ExecutionEngine/OProfileWrapper.h"
200
201  // Exclude these; they're intended to be included into only a single
202  // translation unit (or none) and aren't part of this module.
203  exclude header "llvm/ExecutionEngine/MCJIT.h"
204  exclude header "llvm/ExecutionEngine/Interpreter.h"
205
206  // Exclude headers from LLVM_OrcSupport.
207  exclude header "llvm/ExecutionEngine/Orc/Shared/OrcError.h"
208}
209
210module LLVM_FileCheck {
211  requires cplusplus
212
213  umbrella "llvm/FileCheck"
214  module * { export * }
215}
216
217module LLVM_Frontend_OpenMP {
218  requires cplusplus
219
220  umbrella "llvm/Frontend/OpenMP"
221  module * { export * }
222
223  exclude header "llvm/Frontend/OpenMP/OMPKinds.def"
224}
225
226// Orc utilities that don't depend only on Support (not ExecutionEngine or
227// IR). This is a workaround for ExecutionEngine's broken layering, and will
228// be removed in the future.
229module LLVM_OrcSupport {
230  requires cplusplus
231
232  header "llvm/ExecutionEngine/Orc/Shared/OrcError.h"
233
234  export *
235}
236
237module LLVM_Pass {
238  module Pass {
239    // PassSupport.h and PassAnalysisSupport.h are made available only through
240    // Pass.h.
241    header "llvm/Pass.h"
242    textual header "llvm/PassSupport.h"
243    textual header "llvm/PassAnalysisSupport.h"
244    export *
245  }
246
247  module PassRegistry { header "llvm/PassRegistry.h" export * }
248  module InitializePasses { header "llvm/InitializePasses.h" export * }
249}
250
251module LLVM_IR {
252  requires cplusplus
253
254  umbrella "llvm/IR"
255  module * { export * }
256
257  extern module LLVM_Extern_IR_Attributes_Gen "module.extern.modulemap"
258  extern module LLVM_Extern_IR_Intrinsics_Gen "module.extern.modulemap"
259  extern module LLVM_Extern_IR_Intrinsics_Enum "module.extern.modulemap"
260
261  // These are intended for (repeated) textual inclusion.
262  textual header "llvm/IR/ConstrainedOps.def"
263  textual header "llvm/IR/DebugInfoFlags.def"
264  textual header "llvm/IR/Instruction.def"
265  textual header "llvm/IR/Metadata.def"
266  textual header "llvm/IR/FixedMetadataKinds.def"
267  textual header "llvm/IR/Value.def"
268  textual header "llvm/IR/VPIntrinsics.def"
269  textual header "llvm/IR/RuntimeLibcalls.def"
270}
271
272module LLVM_IRReader {
273  requires cplusplus
274  umbrella "llvm/IRReader"
275  module * { export * }
276}
277
278module LLVM_LineEditor {
279  requires cplusplus
280  umbrella "llvm/LineEditor"
281  module * { export * }
282}
283
284module LLVM_LTO {
285  requires cplusplus
286  umbrella "llvm/LTO"
287  module * { export * }
288}
289
290module LLVM_MC {
291  requires cplusplus
292
293  umbrella "llvm/MC"
294  module * { export * }
295}
296
297module LLVM_Object {
298  requires cplusplus
299  umbrella "llvm/Object"
300  module * { export * }
301}
302
303module LLVM_Option {
304  requires cplusplus
305  umbrella "llvm/Option"
306  module * { export * }
307}
308
309module LLVM_ProfileData {
310  requires cplusplus
311
312  umbrella "llvm/ProfileData"
313  module * { export * }
314
315  textual header "llvm/ProfileData/InstrProfData.inc"
316  textual header "llvm/ProfileData/MemProfData.inc"
317  textual header "llvm/ProfileData/MIBEntryDef.inc"
318}
319
320// FIXME: Mislayered?
321module LLVM_Support_TargetRegistry {
322  requires cplusplus
323  header "llvm/Support/TargetRegistry.h"
324  export *
325}
326
327module LLVM_TableGen {
328  requires cplusplus
329  umbrella "llvm/TableGen"
330  module * { export * }
331}
332
333module LLVM_Transforms {
334  requires cplusplus
335  umbrella "llvm/Transforms"
336
337  module * { export * }
338
339  // Requires DEBUG_TYPE to be defined by including file.
340  exclude header "llvm/Transforms/Utils/InstructionWorklist.h"
341}
342
343extern module LLVM_Extern_Utils_DataTypes "module.extern.modulemap"
344
345// Build the module with the tablegen-generated files needed by the
346// TargetParser module before building the TargetParser module itself.
347module TargetParserGen {
348  module AArch64TargetParserDef {
349    header "llvm/TargetParser/AArch64TargetParser.h"
350    extern module LLVM_Extern_TargetParser_Gen "module.extern.modulemap"
351    export *
352  }
353  module RISCVTargetParserDef {
354    header "llvm/TargetParser/RISCVTargetParser.h"
355    extern module LLVM_Extern_TargetParser_Gen "module.extern.modulemap"
356    export *
357  }
358}
359
360// A module covering ADT/ and Support/. These are intertwined and
361// codependent, and notionally form a single module.
362module LLVM_Utils {
363  module ADT {
364    requires cplusplus
365
366    umbrella "llvm/ADT"
367    module * { export * }
368  }
369
370  module Demangle {
371    requires cplusplus
372
373    umbrella "llvm/Demangle"
374    module * { export * }
375
376    textual header "llvm/Demangle/ItaniumNodes.def"
377  }
378
379  module Support {
380    requires cplusplus
381
382    umbrella "llvm/Support"
383    module * { export * }
384
385    // Exclude this; it should only be used on Windows.
386    exclude header "llvm/Support/Windows/WindowsSupport.h"
387
388    // Exclude these; they are fundamentally non-modular.
389    exclude header "llvm/Support/PluginLoader.h"
390    exclude header "llvm/Support/Solaris/sys/regset.h"
391    textual header "llvm/Support/TargetOpcodes.def"
392
393  }
394
395  module TargetParser {
396    requires cplusplus
397
398    umbrella "llvm/TargetParser"
399    module * { export * }
400
401    // These are intended for textual inclusion.
402    textual header "llvm/TargetParser/ARMTargetParser.def"
403    textual header "llvm/TargetParser/CSKYTargetParser.def"
404    textual header "llvm/TargetParser/X86TargetParser.def"
405    textual header "llvm/TargetParser/LoongArchTargetParser.def"
406    textual header "llvm/TargetParser/PPCTargetParser.def"
407  }
408
409  // This part of the module is usable from both C and C++ code.
410  module ConvertUTF {
411    header "llvm/Support/ConvertUTF.h"
412    export *
413  }
414}
415
416// This is used for a $src == $build compilation. Otherwise we use
417// LLVM_Support_DataTypes_Build, defined in a module map that is
418// copied into the build area.
419module LLVM_Support_DataTypes_Src {
420  header "llvm/Support/DataTypes.h"
421  export *
422}
423
424module LLVM_WindowsManifest {
425  requires cplusplus
426  umbrella "llvm/WindowsManifest"
427  module * { export * }
428}
429