aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/module.modulemap
blob: 46f6e40041edeb84692e0bbd43d266f6ee92a557 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
module LLVM_Analysis {
  requires cplusplus
  umbrella "Analysis"
  module * { export * }
  exclude header "Analysis/BlockFrequencyInfoImpl.h"
}

module LLVM_AsmParser { requires cplusplus umbrella "AsmParser" module * { export * } }

// A module covering CodeGen/ and Target/. These are intertwined
// and codependent, and thus notionally form a single module.
module LLVM_Backend {
  requires cplusplus

  module CodeGen {
    umbrella "CodeGen"
    module * { export * }

    // FIXME: Why is this excluded?
    exclude header "CodeGen/MachineValueType.h"

    // Exclude these; they're intended to be included into only a single
    // translation unit (or none) and aren't part of this module.
    exclude header "CodeGen/CommandFlags.h"
    exclude header "CodeGen/LinkAllAsmWriterComponents.h"
    exclude header "CodeGen/LinkAllCodegenComponents.h"
  }

  module Target {
    umbrella "Target"
    module * { export * }
  }

  // FIXME: Where should this go?
  module Analysis_BlockFrequencyInfoImpl {
    header "Analysis/BlockFrequencyInfoImpl.h"
    export *
  }
}

module LLVM_Bitcode { requires cplusplus umbrella "Bitcode" module * { export * } }
module LLVM_Config { requires cplusplus umbrella "Config" module * { export * } }
module LLVM_DebugInfo { requires cplusplus umbrella "DebugInfo" module * { export * } }
module LLVM_ExecutionEngine {
  requires cplusplus

  umbrella "ExecutionEngine"
  module * { export * }

  // Exclude this; it's an optional component of the ExecutionEngine.
  exclude header "ExecutionEngine/OProfileWrapper.h"

  // Exclude these; they're intended to be included into only a single
  // translation unit (or none) and aren't part of this module.
  exclude header "ExecutionEngine/JIT.h"
  exclude header "ExecutionEngine/MCJIT.h"
  exclude header "ExecutionEngine/Interpreter.h"
}

module LLVM_IR {
  requires cplusplus

  // FIXME: Is this the right place for these?
  module Pass { header "Pass.h" export * }
  module PassSupport { header "PassSupport.h" export * }
  module PassAnalysisSupport { header "PassAnalysisSupport.h" export * }
  module PassRegistry { header "PassRegistry.h" export * }
  module InitializePasses { header "InitializePasses.h" export * }

  umbrella "IR"
  module * { export * }

  // We cannot have llvm/PassManager.h and llvm/IR/PassManager.h in the same TU,
  // so we can't include llvm/IR/PassManager.h in the IR module.
  exclude header "IR/PassManager.h"
  exclude header "IR/LegacyPassManager.h"

  // Exclude this; it's intended for (repeated) textual inclusion.
  exclude header "IR/Instruction.def"
}

module LLVM_LegacyPassManager {
  requires cplusplus
  module CompatInterface { header "PassManager.h" export * }
  module Implementation { header "IR/LegacyPassManager.h" export * }
}

module LLVM_IR_PassManager {
  requires cplusplus
  // FIXME PR19358: This doesn't work! conflict LLVM_LegacyPassManager, "cannot use legacy pass manager and new pass manager in same file"
  header "IR/PassManager.h"
  export *
}

module LLVM_IRReader { requires cplusplus umbrella "IRReader" module * { export * } }
module LLVM_LineEditor { requires cplusplus umbrella "LineEditor" module * { export * } }
module LLVM_LTO { requires cplusplus umbrella "LTO" module * { export * } }

module LLVM_MC {
  requires cplusplus

  // FIXME: Mislayered?
  module Support_TargetRegistry {
    header "Support/TargetRegistry.h"
    export *
  }

  umbrella "MC"
  module * { export * }

  // Exclude this; it's fundamentally non-modular.
  exclude header "MC/MCTargetOptionsCommandFlags.h"
}

module LLVM_Object {
  requires cplusplus
  umbrella "Object"
  module * { export * }
}

module LLVM_Option { requires cplusplus umbrella "Option" module * { export * } }
module LLVM_TableGen { requires cplusplus umbrella "TableGen" module * { export * } }

module LLVM_Transforms {
  requires cplusplus
  umbrella "Transforms"
  module * { export * }

  // FIXME: Excluded because it does bad things with the legacy pass manager.
  exclude header "Transforms/IPO/PassManagerBuilder.h"
}

// A module covering ADT/ and Support/. These are intertwined and
// codependent, and notionally form a single module.
module LLVM_Utils {
  module ADT {
    requires cplusplus

    umbrella "ADT"
    module * { export * }
  }

  module Support {
    requires cplusplus

    umbrella "Support"
    module * { export * }

    // Exclude this; it's only included on Solaris.
    exclude header "Support/Solaris.h"

    // Exclude this; it's only included on AIX and fundamentally non-modular.
    exclude header "Support/AIXDataTypesFix.h"

    // Exclude this; it's fundamentally non-modular.
    exclude header "Support/PluginLoader.h"

    // Exclude this; it's a weirdly-factored part of llvm-gcov and conflicts
    // with the Analysis module (which also defines an llvm::GCOVOptions).
    exclude header "Support/GCOV.h"

    // FIXME: Mislayered?
    exclude header "Support/TargetRegistry.h"
  }
}

module LLVM_CodeGen_MachineValueType {
  requires cplusplus
  header "CodeGen/MachineValueType.h"
  export *
}

// This is used for a $src == $build compilation. Otherwise we use
// LLVM_Support_DataTypes_Build, defined in a module map that is
// copied into the build area.
module LLVM_Support_DataTypes_Src {
  header "llvm/Support/DataTypes.h"
  export *
}