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