llvm.org GIT mirror llvm / 651f680
[modules] Add module maps for LLVM. These are not quite ready for prime-time yet, but only a few more Clang patches need to land. (I have 'ninja check' passing locally.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209269 91177308-0d34-0410-b5e6-96231b3b80d8 Richard Smith 5 years ago
11 changed file(s) with 203 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
1111 set_target_properties(llvm_headers_do_not_build PROPERTIES FOLDER "Misc"
1212 EXCLUDE_FROM_DEFAULT_BUILD ON)
1313 endif()
14
15 # If we're doing an out-of-tree build, copy a module map for generated
16 # header files into the build area.
17 if (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
18 configure_file(module.modulemap.build module.modulemap COPYONLY)
19 endif (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
0 module LLVM_Analysis {
1 requires cplusplus
2 umbrella "Analysis"
3 module * { export * }
4 exclude header "Analysis/BlockFrequencyInfoImpl.h"
5 }
6
7 module LLVM_AsmParser { requires cplusplus umbrella "AsmParser" module * { export * } }
8
9 // A module covering CodeGen/ and Target/. These are intertwined
10 // and codependent, and thus notionally form a single module.
11 module LLVM_Backend {
12 requires cplusplus
13
14 module CodeGen {
15 umbrella "CodeGen"
16 module * { export * }
17
18 // FIXME: Why is this excluded?
19 exclude header "CodeGen/MachineValueType.h"
20
21 // Exclude these; they're intended to be included into only a single
22 // translation unit (or none) and aren't part of this module.
23 exclude header "CodeGen/CommandFlags.h"
24 exclude header "CodeGen/LinkAllAsmWriterComponents.h"
25 exclude header "CodeGen/LinkAllCodegenComponents.h"
26 }
27
28 module Target {
29 umbrella "Target"
30 module * { export * }
31 }
32
33 // FIXME: Where should this go?
34 module Analysis_BlockFrequencyInfoImpl {
35 header "Analysis/BlockFrequencyInfoImpl.h"
36 export *
37 }
38 }
39
40 module LLVM_Bitcode { requires cplusplus umbrella "Bitcode" module * { export * } }
41 module LLVM_Config { requires cplusplus umbrella "Config" module * { export * } }
42 module LLVM_DebugInfo { requires cplusplus umbrella "DebugInfo" module * { export * } }
43 module LLVM_ExecutionEngine {
44 requires cplusplus
45
46 umbrella "ExecutionEngine"
47 module * { export * }
48
49 // Exclude this; it's an optional component of the ExecutionEngine.
50 exclude header "ExecutionEngine/OProfileWrapper.h"
51
52 // Exclude these; they're intended to be included into only a single
53 // translation unit (or none) and aren't part of this module.
54 exclude header "ExecutionEngine/JIT.h"
55 exclude header "ExecutionEngine/MCJIT.h"
56 exclude header "ExecutionEngine/Interpreter.h"
57 }
58
59 module LLVM_IR {
60 requires cplusplus
61
62 // FIXME: Is this the right place for these?
63 module Pass { header "Pass.h" export * }
64 module PassSupport { header "PassSupport.h" export * }
65 module PassAnalysisSupport { header "PassAnalysisSupport.h" export * }
66 module PassRegistry { header "PassRegistry.h" export * }
67 module InitializePasses { header "InitializePasses.h" export * }
68
69 umbrella "IR"
70 module * { export * }
71
72 // We cannot have llvm/PassManager.h and llvm/IR/PassManager.h in the same TU,
73 // so we can't include llvm/IR/PassManager.h in the IR module.
74 exclude header "IR/PassManager.h"
75 exclude header "IR/LegacyPassManager.h"
76
77 // Exclude this; it's intended for (repeated) textual inclusion.
78 exclude header "IR/Instruction.def"
79 }
80
81 module LLVM_LegacyPassManager {
82 requires cplusplus
83 module CompatInterface { header "PassManager.h" export * }
84 module Implementation { header "IR/LegacyPassManager.h" export * }
85 }
86
87 module LLVM_IR_PassManager {
88 requires cplusplus
89 // FIXME PR19358: This doesn't work! conflict LLVM_LegacyPassManager, "cannot use legacy pass manager and new pass manager in same file"
90 header "IR/PassManager.h"
91 export *
92 }
93
94 module LLVM_IRReader { requires cplusplus umbrella "IRReader" module * { export * } }
95 module LLVM_LineEditor { requires cplusplus umbrella "LineEditor" module * { export * } }
96 module LLVM_LTO { requires cplusplus umbrella "LTO" module * { export * } }
97
98 module LLVM_MC {
99 requires cplusplus
100
101 // FIXME: Mislayered?
102 module Support_TargetRegistry {
103 header "Support/TargetRegistry.h"
104 export *
105 }
106
107 umbrella "MC"
108 module * { export * }
109
110 // Exclude this; it's fundamentally non-modular.
111 exclude header "MC/MCTargetOptionsCommandFlags.h"
112 }
113
114 module LLVM_Object { requires cplusplus umbrella "Object" module * { export * } }
115 module LLVM_Option { requires cplusplus umbrella "Option" module * { export * } }
116 module LLVM_TableGen { requires cplusplus umbrella "TableGen" module * { export * } }
117
118 module LLVM_Transforms {
119 requires cplusplus
120 umbrella "Transforms"
121 module * { export * }
122
123 // FIXME: Excluded because it does bad things with the legacy pass manager.
124 exclude header "Transforms/IPO/PassManagerBuilder.h"
125 }
126
127 // A module covering ADT/ and Support/. These are intertwined and
128 // codependent, and notionally form a single module.
129 module LLVM_Utils {
130 module ADT {
131 requires cplusplus
132
133 umbrella "ADT"
134 module * { export * }
135 }
136
137 module Support {
138 requires cplusplus
139
140 umbrella "Support"
141 module * { export * }
142
143 // Exclude this; it's only included on Solaris.
144 exclude header "Support/Solaris.h"
145
146 // Exclude this; it's only included on AIX and fundamentally non-modular.
147 exclude header "Support/AIXDataTypesFix.h"
148
149 // Exclude this; it's fundamentally non-modular.
150 exclude header "Support/Debug.h"
151
152 // Exclude this; it's fundamentally non-modular.
153 exclude header "Support/PluginLoader.h"
154
155 // Exclude this; it's a weirdly-factored part of llvm-gcov and conflicts
156 // with the Analysis module (which also defines an llvm::GCOVOptions).
157 exclude header "Support/GCOV.h"
158
159 // FIXME: Mislayered?
160 exclude header "Support/TargetRegistry.h"
161 }
162 }
163
164 module LLVM_CodeGen_MachineValueType {
165 requires cplusplus
166 header "CodeGen/MachineValueType.h"
167 export *
168 }
169
170 // This is used for a $src == $build compilation. Otherwise we use
171 // LLVM_Support_DataTypes_Build, defined in a module map that is
172 // copied into the build area.
173 module LLVM_Support_DataTypes_Src {
174 header "llvm/Support/DataTypes.h"
175 export *
176 }
0 // This is copied into the build area for a $src != $build compilation.
1 module LLVM_Support_DataTypes {
2 header "Support/DataTypes.h"
3 export *
4 }
0 module LLVM_C {
1 requires cplusplus
2 umbrella "."
3 module * { export * }
4 }
0 module AsmParser { requires cplusplus umbrella "." module * { export * } }
0 module Bitcode { requires cplusplus umbrella "." module * { export * } }
0 module CodeGen { requires cplusplus umbrella "." module * { export * } }
0 module DebugInfo { requires cplusplus umbrella "." module * { export * } }
0 module IR { requires cplusplus umbrella "." module * { export * } }
0 module TableGen { requires cplusplus umbrella "." module * { export * } }
0 module TableGen {
1 umbrella "."
2 module * { export * }
3 }