1module LLVM_Analysis {
2  requires cplusplus
3  umbrella "Analysis"
4  module * { export * }
5
6  // FIXME: Why is this excluded?
7  exclude header "Analysis/BlockFrequencyInfoImpl.h"
8
9  // This is intended for (repeated) textual inclusion.
10  textual header "Analysis/TargetLibraryInfo.def"
11}
12
13module LLVM_AsmParser { requires cplusplus umbrella "AsmParser" module * { export * } }
14
15// A module covering CodeGen/ and Target/. These are intertwined
16// and codependent, and thus notionally form a single module.
17module LLVM_Backend {
18  requires cplusplus
19
20  module CodeGen {
21    umbrella "CodeGen"
22    module * { export * }
23
24    // FIXME: Why is this excluded?
25    exclude header "CodeGen/MachineValueType.h"
26
27    // Exclude these; they're intended to be included into only a single
28    // translation unit (or none) and aren't part of this module.
29    exclude header "CodeGen/CommandFlags.h"
30    exclude header "CodeGen/LinkAllAsmWriterComponents.h"
31    exclude header "CodeGen/LinkAllCodegenComponents.h"
32  }
33
34  module Target {
35    umbrella "Target"
36    module * { export * }
37  }
38
39  // FIXME: Where should this go?
40  module Analysis_BlockFrequencyInfoImpl {
41    header "Analysis/BlockFrequencyInfoImpl.h"
42    export *
43  }
44}
45
46module LLVM_Bitcode { requires cplusplus umbrella "Bitcode" module * { export * } }
47module LLVM_Config { requires cplusplus umbrella "Config" module * { export * } }
48
49module LLVM_DebugInfo_DWARF {
50  requires cplusplus
51
52  umbrella "DebugInfo/DWARF"
53  module * { export * }
54}
55
56module LLVM_DebugInfo_PDB {
57  requires cplusplus
58
59  umbrella "DebugInfo/PDB"
60  module * { export * }
61
62  // Separate out this subdirectory; it's an optional component that depends on
63  // a separate library which might not be available.
64  //
65  // FIXME: There should be a better way to specify this.
66  exclude header "DebugInfo/PDB/DIA/DIADataStream.h"
67  exclude header "DebugInfo/PDB/DIA/DIAEnumDebugStreams.h"
68  exclude header "DebugInfo/PDB/DIA/DIAEnumLineNumbers.h"
69  exclude header "DebugInfo/PDB/DIA/DIAEnumSourceFiles.h"
70  exclude header "DebugInfo/PDB/DIA/DIAEnumSymbols.h"
71  exclude header "DebugInfo/PDB/DIA/DIALineNumber.h"
72  exclude header "DebugInfo/PDB/DIA/DIARawSymbol.h"
73  exclude header "DebugInfo/PDB/DIA/DIASession.h"
74  exclude header "DebugInfo/PDB/DIA/DIASourceFile.h"
75  exclude header "DebugInfo/PDB/DIA/DIASupport.h"
76}
77
78module LLVM_DebugInfo_PDB_DIA {
79  requires cplusplus
80
81  umbrella "DebugInfo/PDB/DIA"
82  module * { export * }
83}
84
85module LLVM_ExecutionEngine {
86  requires cplusplus
87
88  umbrella "ExecutionEngine"
89  module * { export * }
90
91  // Exclude this; it's an optional component of the ExecutionEngine.
92  exclude header "ExecutionEngine/OProfileWrapper.h"
93
94  // Exclude these; they're intended to be included into only a single
95  // translation unit (or none) and aren't part of this module.
96  exclude header "ExecutionEngine/JIT.h"
97  exclude header "ExecutionEngine/MCJIT.h"
98  exclude header "ExecutionEngine/Interpreter.h"
99  exclude header "ExecutionEngine/OrcMCJITReplacement.h"
100}
101
102module LLVM_IR {
103  requires cplusplus
104
105  // FIXME: Is this the right place for these?
106  module Pass { header "Pass.h" export * }
107  module PassSupport { header "PassSupport.h" export * }
108  module PassAnalysisSupport { header "PassAnalysisSupport.h" export * }
109  module PassRegistry { header "PassRegistry.h" export * }
110  module InitializePasses { header "InitializePasses.h" export * }
111
112  umbrella "IR"
113  module * { export * }
114
115  // These are intended for (repeated) textual inclusion.
116  textual header "IR/DebugInfoFlags.def"
117  textual header "IR/Instruction.def"
118  textual header "IR/Metadata.def"
119}
120
121module LLVM_IRReader { requires cplusplus umbrella "IRReader" module * { export * } }
122module LLVM_LineEditor { requires cplusplus umbrella "LineEditor" module * { export * } }
123module LLVM_LTO { requires cplusplus umbrella "LTO" module * { export * } }
124
125module LLVM_MC {
126  requires cplusplus
127
128  // FIXME: Mislayered?
129  module Support_TargetRegistry {
130    header "Support/TargetRegistry.h"
131    export *
132  }
133
134  umbrella "MC"
135  module * { export * }
136
137  // Exclude this; it's fundamentally non-modular.
138  exclude header "MC/MCTargetOptionsCommandFlags.h"
139}
140
141module LLVM_Object {
142  requires cplusplus
143  umbrella "Object"
144  module * { export * }
145}
146
147module LLVM_Option { requires cplusplus umbrella "Option" module * { export * } }
148module LLVM_TableGen { requires cplusplus umbrella "TableGen" module * { export * } }
149
150module LLVM_Transforms {
151  requires cplusplus
152  umbrella "Transforms"
153  module * { export * }
154
155  // FIXME: Excluded because it does bad things with the legacy pass manager.
156  exclude header "Transforms/IPO/PassManagerBuilder.h"
157}
158
159// A module covering ADT/ and Support/. These are intertwined and
160// codependent, and notionally form a single module.
161module LLVM_Utils {
162  module ADT {
163    requires cplusplus
164
165    umbrella "ADT"
166    module * { export * }
167  }
168
169  module Support {
170    requires cplusplus
171
172    umbrella "Support"
173    module * { export * }
174
175    // Exclude this; it's only included on Solaris.
176    exclude header "Support/Solaris.h"
177
178    // Exclude this; it's only included on AIX and fundamentally non-modular.
179    exclude header "Support/AIXDataTypesFix.h"
180
181    // Exclude this; it's fundamentally non-modular.
182    exclude header "Support/PluginLoader.h"
183
184    // Exclude this; it's a weirdly-factored part of llvm-gcov and conflicts
185    // with the Analysis module (which also defines an llvm::GCOVOptions).
186    exclude header "Support/GCOV.h"
187
188    // FIXME: Mislayered?
189    exclude header "Support/TargetRegistry.h"
190
191    // These are intended for textual inclusion.
192    textual header "Support/Dwarf.def"
193    textual header "Support/ELFRelocs/AArch64.def"
194    textual header "Support/ELFRelocs/ARM.def"
195    textual header "Support/ELFRelocs/Hexagon.def"
196    textual header "Support/ELFRelocs/i386.def"
197    textual header "Support/ELFRelocs/Mips.def"
198    textual header "Support/ELFRelocs/PowerPC64.def"
199    textual header "Support/ELFRelocs/PowerPC.def"
200    textual header "Support/ELFRelocs/Sparc.def"
201    textual header "Support/ELFRelocs/SystemZ.def"
202    textual header "Support/ELFRelocs/x86_64.def"
203  }
204}
205
206module LLVM_CodeGen_MachineValueType {
207  requires cplusplus
208  header "CodeGen/MachineValueType.h"
209  export *
210}
211
212// This is used for a $src == $build compilation. Otherwise we use
213// LLVM_Support_DataTypes_Build, defined in a module map that is
214// copied into the build area.
215module LLVM_Support_DataTypes_Src {
216  header "llvm/Support/DataTypes.h"
217  export *
218}
219