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