1module LLVM_Analysis { 2 requires cplusplus 3 umbrella "Analysis" 4 module * { export * } 5 6 // This is intended for (repeated) textual inclusion. 7 textual header "Analysis/TargetLibraryInfo.def" 8 textual header "Analysis/VecFuncs.def" 9} 10 11module LLVM_AsmParser { 12 requires cplusplus 13 umbrella "AsmParser" 14 module * { export * } 15} 16 17// A module covering CodeGen/ and Target/. These are intertwined 18// and codependent, and thus notionally form a single module. 19module LLVM_Backend { 20 requires cplusplus 21 22 module CodeGen { 23 umbrella "CodeGen" 24 module * { export * } 25 26 // Exclude these; they're intended to be included into only a single 27 // translation unit (or none) and aren't part of this module. 28 exclude header "CodeGen/LinkAllAsmWriterComponents.h" 29 exclude header "CodeGen/LinkAllCodegenComponents.h" 30 31 // These are intended for (repeated) textual inclusion. 32 textual header "CodeGen/DIEValue.def" 33 textual header "CodeGen/MachinePassRegistry.def" 34 } 35} 36 37// FIXME: Make this as a submodule of LLVM_Backend again. 38// Doing so causes a linker error in clang-format. 39module LLVM_Backend_Target { 40 umbrella "Target" 41 module * { export * } 42} 43 44module LLVM_Bitcode { 45 requires cplusplus 46 umbrella "Bitcode" 47 module * { export * } 48} 49 50module LLVM_Bitstream { 51 requires cplusplus 52 umbrella "Bitstream" 53 module * { export * } 54} 55 56module LLVM_BinaryFormat { 57 requires cplusplus 58 umbrella "BinaryFormat" module * { export * } 59 textual header "BinaryFormat/Dwarf.def" 60 textual header "BinaryFormat/DynamicTags.def" 61 textual header "BinaryFormat/MachO.def" 62 textual header "BinaryFormat/MinidumpConstants.def" 63 textual header "BinaryFormat/ELFRelocs/AArch64.def" 64 textual header "BinaryFormat/ELFRelocs/AMDGPU.def" 65 textual header "BinaryFormat/ELFRelocs/ARM.def" 66 textual header "BinaryFormat/ELFRelocs/ARC.def" 67 textual header "BinaryFormat/ELFRelocs/AVR.def" 68 textual header "BinaryFormat/ELFRelocs/BPF.def" 69 textual header "BinaryFormat/ELFRelocs/CSKY.def" 70 textual header "BinaryFormat/ELFRelocs/Hexagon.def" 71 textual header "BinaryFormat/ELFRelocs/i386.def" 72 textual header "BinaryFormat/ELFRelocs/Lanai.def" 73 textual header "BinaryFormat/ELFRelocs/M68k.def" 74 textual header "BinaryFormat/ELFRelocs/Mips.def" 75 textual header "BinaryFormat/ELFRelocs/MSP430.def" 76 textual header "BinaryFormat/ELFRelocs/PowerPC64.def" 77 textual header "BinaryFormat/ELFRelocs/PowerPC.def" 78 textual header "BinaryFormat/ELFRelocs/RISCV.def" 79 textual header "BinaryFormat/ELFRelocs/Sparc.def" 80 textual header "BinaryFormat/ELFRelocs/SystemZ.def" 81 textual header "BinaryFormat/ELFRelocs/VE.def" 82 textual header "BinaryFormat/ELFRelocs/x86_64.def" 83 textual header "BinaryFormat/WasmRelocs.def" 84 textual header "BinaryFormat/MsgPack.def" 85} 86 87module LLVM_Config { 88 requires cplusplus 89 umbrella "Config" 90 extern module LLVM_Extern_Config_Def "module.extern.modulemap" 91 module * { export * } 92} 93 94module LLVM_DebugInfo { 95 requires cplusplus 96 module DIContext { header "DebugInfo/DIContext.h" export * } 97} 98 99module LLVM_DebugInfo_DWARF { 100 requires cplusplus 101 102 umbrella "DebugInfo/DWARF" 103 module * { export * } 104} 105 106module LLVM_DebugInfo_PDB { 107 requires cplusplus 108 109 umbrella "DebugInfo/PDB" 110 module * { export * } 111 112 // Separate out this subdirectory; it's an optional component that depends on 113 // a separate library which might not be available. 114 // 115 // FIXME: There should be a better way to specify this. 116 exclude header "DebugInfo/PDB/DIA/DIADataStream.h" 117 exclude header "DebugInfo/PDB/DIA/DIAEnumDebugStreams.h" 118 exclude header "DebugInfo/PDB/DIA/DIAEnumFrameData.h" 119 exclude header "DebugInfo/PDB/DIA/DIAEnumInjectedSources.h" 120 exclude header "DebugInfo/PDB/DIA/DIAEnumLineNumbers.h" 121 exclude header "DebugInfo/PDB/DIA/DIAEnumSectionContribs.h" 122 exclude header "DebugInfo/PDB/DIA/DIAEnumSourceFiles.h" 123 exclude header "DebugInfo/PDB/DIA/DIAEnumSymbols.h" 124 exclude header "DebugInfo/PDB/DIA/DIAEnumTables.h" 125 exclude header "DebugInfo/PDB/DIA/DIAError.h" 126 exclude header "DebugInfo/PDB/DIA/DIAFrameData.h" 127 exclude header "DebugInfo/PDB/DIA/DIAInjectedSource.h" 128 exclude header "DebugInfo/PDB/DIA/DIALineNumber.h" 129 exclude header "DebugInfo/PDB/DIA/DIARawSymbol.h" 130 exclude header "DebugInfo/PDB/DIA/DIASectionContrib.h" 131 exclude header "DebugInfo/PDB/DIA/DIASession.h" 132 exclude header "DebugInfo/PDB/DIA/DIASourceFile.h" 133 exclude header "DebugInfo/PDB/DIA/DIASupport.h" 134 exclude header "DebugInfo/PDB/DIA/DIATable.h" 135 exclude header "DebugInfo/PDB/DIA/DIAUtils.h" 136} 137 138module LLVM_DebugInfo_PDB_DIA { 139 requires cplusplus 140 141 umbrella "DebugInfo/PDB/DIA" 142 module * { export * } 143} 144 145module LLVM_DebugInfo_MSF { 146 requires cplusplus 147 148 umbrella "DebugInfo/MSF" 149 module * { export * } 150} 151 152module LLVM_DebugInfo_CodeView { 153 requires cplusplus 154 155 umbrella "DebugInfo/CodeView" 156 module * { export * } 157 158 // These are intended for (repeated) textual inclusion. 159 textual header "DebugInfo/CodeView/CodeViewRegisters.def" 160 textual header "DebugInfo/CodeView/CodeViewTypes.def" 161 textual header "DebugInfo/CodeView/CodeViewSymbols.def" 162} 163 164module LLVM_DWARFLinker { 165 requires cplusplus 166 167 umbrella "DWARFLinker" 168 module * { export * } 169} 170 171module LLVM_ExecutionEngine { 172 requires cplusplus 173 174 umbrella "ExecutionEngine" 175 module * { export * } 176 177 // Exclude this; it's an optional component of the ExecutionEngine. 178 exclude header "ExecutionEngine/OProfileWrapper.h" 179 180 // Exclude these; they're intended to be included into only a single 181 // translation unit (or none) and aren't part of this module. 182 exclude header "ExecutionEngine/MCJIT.h" 183 exclude header "ExecutionEngine/Interpreter.h" 184 185 // Exclude headers from LLVM_OrcSupport. 186 exclude header "ExecutionEngine/Orc/Shared/OrcError.h" 187} 188 189module LLVM_FileCheck { 190 requires cplusplus 191 192 umbrella "FileCheck" 193 module * { export * } 194} 195 196module LLVM_Frontend_OpenMP { 197 requires cplusplus 198 199 umbrella "Frontend/OpenMP" 200 module * { export * } 201 202 exclude header "Frontend/OpenMP/OMPKinds.def" 203} 204 205// Orc utilities that don't depend only on Support (not ExecutionEngine or 206// IR). This is a workaround for ExecutionEngine's broken layering, and will 207// be removed in the future. 208module LLVM_OrcSupport { 209 requires cplusplus 210 211 header "ExecutionEngine/Orc/Shared/OrcError.h" 212 213 export * 214} 215 216module LLVM_Pass { 217 module Pass { 218 // PassSupport.h and PassAnalysisSupport.h are made available only through 219 // Pass.h. 220 header "Pass.h" 221 textual header "PassSupport.h" 222 textual header "PassAnalysisSupport.h" 223 export * 224 } 225 226 module PassRegistry { header "PassRegistry.h" export * } 227 module InitializePasses { header "InitializePasses.h" export * } 228} 229 230module LLVM_intrinsic_gen { 231 requires cplusplus 232 233 // Delay building the modules containing dependencies to Attributes.h and 234 // Intrinsics.h because they need to be generated by tablegen first. 235 236 // Attributes.h 237 module IR_Argument { header "IR/Argument.h" export * } 238 module IR_Attributes { 239 header "IR/Attributes.h" 240 extern module LLVM_Extern_IR_Attributes_Gen "module.extern.modulemap" 241 export * 242 } 243 module IR_AbstractCallSite { header "IR/AbstractCallSite.h" export * } 244 module IR_ConstantFolder { header "IR/ConstantFolder.h" export * } 245 module IR_GlobalVariable { header "IR/GlobalVariable.h" export * } 246 module IR_NoFolder { header "IR/NoFolder.h" export * } 247 module IRBuilderFolder { header "IR/IRBuilderFolder.h" export * } 248 module IR_Module { header "IR/Module.h" export * } 249 module IR_ModuleSummaryIndex { header "IR/ModuleSummaryIndex.h" export * } 250 module IR_ModuleSummaryIndexYAML { header "IR/ModuleSummaryIndexYAML.h" export * } 251 module IR_Function { header "IR/Function.h" export * } 252 module IR_InstrTypes { header "IR/InstrTypes.h" export * } 253 module IR_Instructions { header "IR/Instructions.h" export * } 254 255 256 // Intrinsics.h 257 module IR_CFG { header "IR/CFG.h" export * } 258 module IR_ConstantRange { header "IR/ConstantRange.h" export * } 259 module IR_Dominators { header "IR/Dominators.h" export * } 260 module IR_FixedPointBuilder { header "IR/FixedPointBuilder.h" export * } 261 module Analysis_PostDominators { header "Analysis/PostDominators.h" export * } 262 module Analysis_DomTreeUpdater { header "Analysis/DomTreeUpdater.h" export * } 263 module IR_IRBuilder { header "IR/IRBuilder.h" export * } 264 module IR_IRPrintingPasses { header "IR/IRPrintingPasses.h" export * } 265 module IR_MatrixBuilder { header "IR/MatrixBuilder.h" export * } 266 module IR_PassManager { header "IR/PassManager.h" export * } 267 module IR_PassManagerImpl { header "IR/PassManagerImpl.h" export * } 268 module IR_PredIteratorCache { header "IR/PredIteratorCache.h" export * } 269 module IR_Verifier { header "IR/Verifier.h" export * } 270 module IR_InstIterator { header "IR/InstIterator.h" export * } 271 module IR_InstVisitor { header "IR/InstVisitor.h" export * } 272 module IR_Intrinsics { 273 header "IR/Intrinsics.h" 274 extern module LLVM_Extern_IR_Intricsics_Gen "module.extern.modulemap" 275 extern module LLVM_Extern_IR_Intrinsics_Enum "module.extern.modulemap" 276 export * 277 } 278 module IR_IntrinsicInst { header "IR/IntrinsicInst.h" export * } 279 module IR_PatternMatch { header "IR/PatternMatch.h" export * } 280 module IR_SafepointIRVerifier { header "IR/SafepointIRVerifier.h" export * } 281 module IR_Statepoint { header "IR/Statepoint.h" export * } 282 283 export * 284} 285 286module LLVM_IR { 287 requires cplusplus 288 289 umbrella "IR" 290 module * { export * } 291 292 // These are intended for (repeated) textual inclusion. 293 textual header "IR/ConstrainedOps.def" 294 textual header "IR/DebugInfoFlags.def" 295 textual header "IR/Instruction.def" 296 textual header "IR/Metadata.def" 297 textual header "IR/FixedMetadataKinds.def" 298 textual header "IR/Value.def" 299 textual header "IR/VPIntrinsics.def" 300 textual header "IR/RuntimeLibcalls.def" 301} 302 303module LLVM_IRReader { 304 requires cplusplus 305 umbrella "IRReader" 306 module * { export * } 307} 308 309module LLVM_LineEditor { 310 requires cplusplus 311 umbrella "LineEditor" 312 module * { export * } 313} 314 315module LLVM_LTO { 316 requires cplusplus 317 umbrella "LTO" 318 module * { export * } 319} 320 321module LLVM_MC { 322 requires cplusplus 323 324 umbrella "MC" 325 module * { export * } 326} 327 328// Used by llvm-tblgen 329module LLVM_MC_TableGen { 330 requires cplusplus 331 module MC_LaneBitmask { header "MC/LaneBitmask.h" export * } 332 module MC_FixedLenDisassembler { header "MC/MCFixedLenDisassembler.h" export * } 333 module MC_InstrItineraries { header "MC/MCInstrItineraries.h" export * } 334 module MC_Schedule { header "MC/MCSchedule.h" export * } 335 module MC_SubtargetFeature { header "MC/SubtargetFeature.h" export * } 336} 337 338module LLVM_Object { 339 requires cplusplus 340 umbrella "Object" 341 module * { export * } 342} 343 344module LLVM_Option { 345 requires cplusplus 346 umbrella "Option" 347 module * { export * } 348} 349 350module LLVM_ProfileData { 351 requires cplusplus 352 353 umbrella "ProfileData" 354 module * { export * } 355 356 textual header "ProfileData/InstrProfData.inc" 357} 358 359// FIXME: Mislayered? 360module LLVM_Support_TargetRegistry { 361 requires cplusplus 362 header "Support/TargetRegistry.h" 363 export * 364} 365 366module LLVM_TableGen { 367 requires cplusplus 368 umbrella "TableGen" 369 module * { export * } 370} 371 372module LLVM_Transforms { 373 requires cplusplus 374 umbrella "Transforms" 375 376 module * { export * } 377 378 // Requires DEBUG_TYPE to be defined by including file. 379 exclude header "Transforms/Utils/InstructionWorklist.h" 380} 381 382extern module LLVM_Extern_Utils_DataTypes "module.extern.modulemap" 383 384// A module covering ADT/ and Support/. These are intertwined and 385// codependent, and notionally form a single module. 386module LLVM_Utils { 387 module ADT { 388 requires cplusplus 389 390 umbrella "ADT" 391 module * { export * } 392 } 393 394 module Support { 395 requires cplusplus 396 397 umbrella "Support" 398 module * { export * } 399 400 // Exclude this; it should only be used on Windows. 401 exclude header "Support/Windows/WindowsSupport.h" 402 403 // Exclude these; they are fundamentally non-modular. 404 exclude header "Support/PluginLoader.h" 405 exclude header "Support/Solaris/sys/regset.h" 406 407 // These are intended for textual inclusion. 408 textual header "Support/AArch64TargetParser.def" 409 textual header "Support/ARMTargetParser.def" 410 textual header "Support/RISCVTargetParser.def" 411 textual header "Support/TargetOpcodes.def" 412 textual header "Support/X86TargetParser.def" 413 } 414 415 // This part of the module is usable from both C and C++ code. 416 module ConvertUTF { 417 header "Support/ConvertUTF.h" 418 export * 419 } 420} 421 422// This is used for a $src == $build compilation. Otherwise we use 423// LLVM_Support_DataTypes_Build, defined in a module map that is 424// copied into the build area. 425module LLVM_Support_DataTypes_Src { 426 header "llvm/Support/DataTypes.h" 427 export * 428} 429 430module LLVM_WindowsManifest { 431 requires cplusplus 432 umbrella "WindowsManifest" 433 module * { export * } 434} 435