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