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