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