vsapsai updated this revision to Diff 515194. vsapsai added a comment. Don't touch HeaderSearch.cpp as the actual change in header search will be a separate patch.
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148776/new/ https://reviews.llvm.org/D148776 Files: clang/include/clang-c/module.modulemap clang/include/clang/module.modulemap clang/include/module.modulemap lldb/include/lldb/module.modulemap lldb/include/module.modulemap llvm/CMakeLists.txt llvm/include/CMakeLists.txt llvm/include/llvm-c/module.modulemap llvm/include/llvm/CMakeLists.txt llvm/include/llvm/module.extern.modulemap llvm/include/llvm/module.install.modulemap llvm/include/llvm/module.modulemap llvm/include/llvm/module.modulemap.build llvm/include/module.extern.modulemap llvm/include/module.install.modulemap llvm/include/module.modulemap llvm/include/module.modulemap.build
Index: llvm/include/module.modulemap.build =================================================================== --- llvm/include/module.modulemap.build +++ llvm/include/module.modulemap.build @@ -1,13 +1,13 @@ // This is copied into the build area for a $src != $build compilation. module LLVM_Support_DataTypes { - header "Support/DataTypes.h" + header "llvm/Support/DataTypes.h" export * } module LLVM_Config_ABI_Breaking { - header "Config/abi-breaking.h" + header "llvm/Config/abi-breaking.h" export * } module LLVM_Config_Config { - header "Config/llvm-config.h" + header "llvm/Config/llvm-config.h" export * } Index: llvm/include/module.modulemap =================================================================== --- /dev/null +++ llvm/include/module.modulemap @@ -0,0 +1,481 @@ +module LLVM_C { + umbrella "llvm-c" + module * { export * } +} + +module LLVM_Analysis { + requires cplusplus + umbrella "llvm/Analysis" + module * { export * } + + // This is intended for (repeated) textual inclusion. + textual header "llvm/Analysis/ScalarFuncs.def" + textual header "llvm/Analysis/TargetLibraryInfo.def" + textual header "llvm/Analysis/VecFuncs.def" +} + +module LLVM_AsmParser { + requires cplusplus + umbrella "llvm/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 "llvm/CodeGen" + module * { export * } + + // 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 "llvm/CodeGen/LinkAllAsmWriterComponents.h" + exclude header "llvm/CodeGen/LinkAllCodegenComponents.h" + + exclude header "llvm/CodeGen/CodeGenPassBuilder.h" + + // These are intended for (repeated) textual inclusion. + textual header "llvm/CodeGen/DIEValue.def" + textual header "llvm/CodeGen/MachinePassRegistry.def" + } +} + +// FIXME: Make this as a submodule of LLVM_Backend again. +// Doing so causes a linker error in clang-format. +module LLVM_Backend_Target { + umbrella "llvm/Target" + module * { export * } +} + +module LLVM_Bitcode { + requires cplusplus + umbrella "llvm/Bitcode" + module * { export * } +} + +module LLVM_Bitstream { + requires cplusplus + umbrella "llvm/Bitstream" + module * { export * } +} + +module LLVM_BinaryFormat { + requires cplusplus + umbrella "llvm/BinaryFormat" module * { export * } + textual header "llvm/BinaryFormat/Dwarf.def" + textual header "llvm/BinaryFormat/DXContainerConstants.def" + textual header "llvm/BinaryFormat/DynamicTags.def" + textual header "llvm/BinaryFormat/MachO.def" + textual header "llvm/BinaryFormat/MinidumpConstants.def" + textual header "llvm/BinaryFormat/Swift.def" + textual header "llvm/BinaryFormat/ELFRelocs/AArch64.def" + textual header "llvm/BinaryFormat/ELFRelocs/AMDGPU.def" + textual header "llvm/BinaryFormat/ELFRelocs/ARM.def" + textual header "llvm/BinaryFormat/ELFRelocs/ARC.def" + textual header "llvm/BinaryFormat/ELFRelocs/AVR.def" + textual header "llvm/BinaryFormat/ELFRelocs/BPF.def" + textual header "llvm/BinaryFormat/ELFRelocs/CSKY.def" + textual header "llvm/BinaryFormat/ELFRelocs/Hexagon.def" + textual header "llvm/BinaryFormat/ELFRelocs/i386.def" + textual header "llvm/BinaryFormat/ELFRelocs/Lanai.def" + textual header "llvm/BinaryFormat/ELFRelocs/LoongArch.def" + textual header "llvm/BinaryFormat/ELFRelocs/M68k.def" + textual header "llvm/BinaryFormat/ELFRelocs/Mips.def" + textual header "llvm/BinaryFormat/ELFRelocs/MSP430.def" + textual header "llvm/BinaryFormat/ELFRelocs/PowerPC64.def" + textual header "llvm/BinaryFormat/ELFRelocs/PowerPC.def" + textual header "llvm/BinaryFormat/ELFRelocs/RISCV.def" + textual header "llvm/BinaryFormat/ELFRelocs/Sparc.def" + textual header "llvm/BinaryFormat/ELFRelocs/SystemZ.def" + textual header "llvm/BinaryFormat/ELFRelocs/VE.def" + textual header "llvm/BinaryFormat/ELFRelocs/x86_64.def" + textual header "llvm/BinaryFormat/ELFRelocs/Xtensa.def" + textual header "llvm/BinaryFormat/WasmRelocs.def" + textual header "llvm/BinaryFormat/MsgPack.def" +} + +module LLVM_Config { + requires cplusplus + umbrella "llvm/Config" + extern module LLVM_Extern_Config_Def "module.extern.modulemap" + module * { export * } +} + +module LLVM_DebugInfo { + requires cplusplus + module DIContext { header "llvm/DebugInfo/DIContext.h" export * } +} + +module LLVM_DebugInfo_DWARF { + requires cplusplus + + umbrella "llvm/DebugInfo/DWARF" + module * { export * } +} + +module LLVM_DebugInfo_PDB { + requires cplusplus + + umbrella "llvm/DebugInfo/PDB" + module * { export * } + + // Separate out this subdirectory; it's an optional component that depends on + // a separate library which might not be available. + // + // FIXME: There should be a better way to specify this. + exclude header "llvm/DebugInfo/PDB/DIA/DIADataStream.h" + exclude header "llvm/DebugInfo/PDB/DIA/DIAEnumDebugStreams.h" + exclude header "llvm/DebugInfo/PDB/DIA/DIAEnumFrameData.h" + exclude header "llvm/DebugInfo/PDB/DIA/DIAEnumInjectedSources.h" + exclude header "llvm/DebugInfo/PDB/DIA/DIAEnumLineNumbers.h" + exclude header "llvm/DebugInfo/PDB/DIA/DIAEnumSectionContribs.h" + exclude header "llvm/DebugInfo/PDB/DIA/DIAEnumSourceFiles.h" + exclude header "llvm/DebugInfo/PDB/DIA/DIAEnumSymbols.h" + exclude header "llvm/DebugInfo/PDB/DIA/DIAEnumTables.h" + exclude header "llvm/DebugInfo/PDB/DIA/DIAError.h" + exclude header "llvm/DebugInfo/PDB/DIA/DIAFrameData.h" + exclude header "llvm/DebugInfo/PDB/DIA/DIAInjectedSource.h" + exclude header "llvm/DebugInfo/PDB/DIA/DIALineNumber.h" + exclude header "llvm/DebugInfo/PDB/DIA/DIARawSymbol.h" + exclude header "llvm/DebugInfo/PDB/DIA/DIASectionContrib.h" + exclude header "llvm/DebugInfo/PDB/DIA/DIASession.h" + exclude header "llvm/DebugInfo/PDB/DIA/DIASourceFile.h" + exclude header "llvm/DebugInfo/PDB/DIA/DIASupport.h" + exclude header "llvm/DebugInfo/PDB/DIA/DIATable.h" + exclude header "llvm/DebugInfo/PDB/DIA/DIAUtils.h" +} + +module LLVM_DebugInfo_PDB_DIA { + requires cplusplus + + umbrella "llvm/DebugInfo/PDB/DIA" + module * { export * } +} + +module LLVM_DebugInfo_MSF { + requires cplusplus + + umbrella "llvm/DebugInfo/MSF" + module * { export * } +} + +module LLVM_DebugInfo_CodeView { + requires cplusplus + + umbrella "llvm/DebugInfo/CodeView" + module * { export * } + + // These are intended for (repeated) textual inclusion. + textual header "llvm/DebugInfo/CodeView/CodeViewRegisters.def" + textual header "llvm/DebugInfo/CodeView/CodeViewTypes.def" + textual header "llvm/DebugInfo/CodeView/CodeViewSymbols.def" +} + +module LLVM_DWARFLinker { + requires cplusplus + + umbrella "llvm/DWARFLinker" + module * { export * } +} + +module LLVM_ExecutionEngine { + requires cplusplus + + umbrella "llvm/ExecutionEngine" + module * { export * } + + // Exclude this; it's an optional component of the ExecutionEngine. + exclude header "llvm/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 "llvm/ExecutionEngine/MCJIT.h" + exclude header "llvm/ExecutionEngine/Interpreter.h" + + // Exclude headers from LLVM_OrcSupport. + exclude header "llvm/ExecutionEngine/Orc/Shared/OrcError.h" +} + +module LLVM_FileCheck { + requires cplusplus + + umbrella "llvm/FileCheck" + module * { export * } +} + +module LLVM_Frontend_OpenMP { + requires cplusplus + + umbrella "llvm/Frontend/OpenMP" + module * { export * } + + exclude header "llvm/Frontend/OpenMP/OMPKinds.def" +} + +// Orc utilities that don't depend only on Support (not ExecutionEngine or +// IR). This is a workaround for ExecutionEngine's broken layering, and will +// be removed in the future. +module LLVM_OrcSupport { + requires cplusplus + + header "llvm/ExecutionEngine/Orc/Shared/OrcError.h" + + export * +} + +module LLVM_Pass { + module Pass { + // PassSupport.h and PassAnalysisSupport.h are made available only through + // Pass.h. + header "llvm/Pass.h" + textual header "llvm/PassSupport.h" + textual header "llvm/PassAnalysisSupport.h" + export * + } + + module PassRegistry { header "llvm/PassRegistry.h" export * } + module InitializePasses { header "llvm/InitializePasses.h" export * } +} + +module LLVM_intrinsic_gen { + requires cplusplus + + // Delay building the modules containing dependencies to Attributes.h and + // Intrinsics.h because they need to be generated by tablegen first. + + // Attributes.h + module IR_Argument { header "llvm/IR/Argument.h" export * } + module IR_Attributes { + header "llvm/IR/Attributes.h" + extern module LLVM_Extern_IR_Attributes_Gen "module.extern.modulemap" + export * + } + module IR_AbstractCallSite { header "llvm/IR/AbstractCallSite.h" export * } + module IR_ConstantFold { header "llvm/IR/ConstantFold.h" export * } + module IR_ConstantFolder { header "llvm/IR/ConstantFolder.h" export * } + module IR_GlobalVariable { header "llvm/IR/GlobalVariable.h" export * } + module IR_NoFolder { header "llvm/IR/NoFolder.h" export * } + module IRBuilderFolder { header "llvm/IR/IRBuilderFolder.h" export * } + module IR_Module { header "llvm/IR/Module.h" export * } + module IR_ModuleSummaryIndex { header "llvm/IR/ModuleSummaryIndex.h" export * } + module IR_ModuleSummaryIndexYAML { header "llvm/IR/ModuleSummaryIndexYAML.h" export * } + module IR_Function { header "llvm/IR/Function.h" export * } + module IR_InstrTypes { header "llvm/IR/InstrTypes.h" export * } + module IR_Instructions { header "llvm/IR/Instructions.h" export * } + module IR_TypeFinder { header "llvm/IR/TypeFinder.h" export * } + module IR_VectorBuilder { header "llvm/IR/VectorBuilder.h" export * } + + + // Intrinsics.h + module IR_CFG { header "llvm/IR/CFG.h" export * } + module IR_ConstantRange { header "llvm/IR/ConstantRange.h" export * } + module IR_Dominators { header "llvm/IR/Dominators.h" export * } + module IR_FixedPointBuilder { header "llvm/IR/FixedPointBuilder.h" export * } + module Analysis_PostDominators { header "llvm/Analysis/PostDominators.h" export * } + module Analysis_DomTreeUpdater { header "llvm/Analysis/DomTreeUpdater.h" export * } + module IR_IRBuilder { header "llvm/IR/IRBuilder.h" export * } + module IR_IRPrintingPasses { header "llvm/IR/IRPrintingPasses.h" export * } + module IR_MatrixBuilder { header "llvm/IR/MatrixBuilder.h" export * } + module IR_PassManager { header "llvm/IR/PassManager.h" export * } + module IR_PassManagerImpl { header "llvm/IR/PassManagerImpl.h" export * } + module IR_PredIteratorCache { header "llvm/IR/PredIteratorCache.h" export * } + module IR_Verifier { header "llvm/IR/Verifier.h" export * } + module IR_InstIterator { header "llvm/IR/InstIterator.h" export * } + module IR_InstVisitor { header "llvm/IR/InstVisitor.h" export * } + module IR_Intrinsics { + header "llvm/IR/Intrinsics.h" + extern module LLVM_Extern_IR_Intricsics_Gen "module.extern.modulemap" + extern module LLVM_Extern_IR_Intrinsics_Enum "module.extern.modulemap" + export * + } + module IR_IntrinsicInst { header "llvm/IR/IntrinsicInst.h" export * } + module IR_PatternMatch { header "llvm/IR/PatternMatch.h" export * } + module IR_SafepointIRVerifier { header "llvm/IR/SafepointIRVerifier.h" export * } + module IR_Statepoint { header "llvm/IR/Statepoint.h" export * } + module IR_DebugInfo { header "llvm/IR/DebugInfo.h" export * } + + export * +} + +module LLVM_IR { + requires cplusplus + + umbrella "llvm/IR" + module * { export * } + + // These are intended for (repeated) textual inclusion. + textual header "llvm/IR/ConstrainedOps.def" + textual header "llvm/IR/DebugInfoFlags.def" + textual header "llvm/IR/Instruction.def" + textual header "llvm/IR/Metadata.def" + textual header "llvm/IR/FixedMetadataKinds.def" + textual header "llvm/IR/Value.def" + textual header "llvm/IR/VPIntrinsics.def" + textual header "llvm/IR/RuntimeLibcalls.def" +} + +module LLVM_IRReader { + requires cplusplus + umbrella "llvm/IRReader" + module * { export * } +} + +module LLVM_LineEditor { + requires cplusplus + umbrella "llvm/LineEditor" + module * { export * } +} + +module LLVM_LTO { + requires cplusplus + umbrella "llvm/LTO" + module * { export * } +} + +module LLVM_MC { + requires cplusplus + + umbrella "llvm/MC" + module * { export * } +} + +// Used by llvm-tblgen +module LLVM_MC_TableGen { + requires cplusplus + module MC_LaneBitmask { header "llvm/MC/LaneBitmask.h" export * } + module MC_InstrItineraries { header "llvm/MC/MCInstrItineraries.h" export * } + module MC_Schedule { header "llvm/MC/MCSchedule.h" export * } + module MC_SubtargetFeature { header "llvm/MC/SubtargetFeature.h" export * } +} + +module LLVM_Object { + requires cplusplus + umbrella "llvm/Object" + module * { export * } +} + +module LLVM_Option { + requires cplusplus + umbrella "llvm/Option" + module * { export * } +} + +module LLVM_ProfileData { + requires cplusplus + + umbrella "llvm/ProfileData" + module * { export * } + + textual header "llvm/ProfileData/InstrProfData.inc" + textual header "llvm/ProfileData/MemProfData.inc" + textual header "llvm/ProfileData/MIBEntryDef.inc" +} + +// FIXME: Mislayered? +module LLVM_Support_TargetRegistry { + requires cplusplus + header "llvm/Support/TargetRegistry.h" + export * +} + +module LLVM_TableGen { + requires cplusplus + umbrella "llvm/TableGen" + module * { export * } +} + +module LLVM_Transforms { + requires cplusplus + umbrella "llvm/Transforms" + + module * { export * } + + // Requires DEBUG_TYPE to be defined by including file. + exclude header "llvm/Transforms/Utils/InstructionWorklist.h" +} + +extern module LLVM_Extern_Utils_DataTypes "module.extern.modulemap" + +// Build the module with the tablegen-generated files needed by the +// TargetParser module before building the TargetParser module itself. +module TargetParserGen { + module RISCVTargetParserDef { + header "llvm/TargetParser/RISCVTargetParser.h" + extern module LLVM_Extern_TargetParser_Gen "module.extern.modulemap" + export * + } +} + +// 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 "llvm/ADT" + module * { export * } + } + + module Demangle { + requires cplusplus + + umbrella "llvm/Demangle" + module * { export * } + + textual header "llvm/Demangle/ItaniumNodes.def" + } + + module Support { + requires cplusplus + + umbrella "llvm/Support" + module * { export * } + + // Exclude this; deprecated. + exclude header "llvm/Support/Host.h" + + // Exclude this; it should only be used on Windows. + exclude header "llvm/Support/Windows/WindowsSupport.h" + + // Exclude these; they are fundamentally non-modular. + exclude header "llvm/Support/PluginLoader.h" + exclude header "llvm/Support/Solaris/sys/regset.h" + textual header "llvm/Support/TargetOpcodes.def" + + } + + module TargetParser { + requires cplusplus + + umbrella "llvm/TargetParser" + module * { export * } + + // These are intended for textual inclusion. + textual header "llvm/TargetParser/ARMTargetParser.def" + textual header "llvm/TargetParser/CSKYTargetParser.def" + textual header "llvm/TargetParser/X86TargetParser.def" + textual header "llvm/TargetParser/LoongArchTargetParser.def" + } + + // This part of the module is usable from both C and C++ code. + module ConvertUTF { + header "llvm/Support/ConvertUTF.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 * +} + +module LLVM_WindowsManifest { + requires cplusplus + umbrella "llvm/WindowsManifest" + module * { export * } +} Index: llvm/include/module.install.modulemap =================================================================== --- /dev/null +++ llvm/include/module.install.modulemap @@ -0,0 +1,31 @@ + +module LLVM_Extern_Config_Def { + textual header "llvm/Config/AsmParsers.def" + textual header "llvm/Config/AsmPrinters.def" + textual header "llvm/Config/Disassemblers.def" + textual header "llvm/Config/Targets.def" + export * +} + +module LLVM_Extern_IR_Attributes_Gen { + textual header "llvm/IR/Attributes.gen" + textual header "llvm/IR/Attributes.inc" +} + +module LLVM_Extern_IR_Intrinsics_Gen { + textual header "llvm/IR/Intrinsics.gen" + textual header "llvm/IR/Intrinsics.inc" +} + +module LLVM_Extern_IR_Intrinsics_Enum { + textual header "llvm/IR/IntrinsicEnums.inc" +} + +module LLVM_Extern_Utils_DataTypes { + header "llvm/Support/DataTypes.h" + export * +} + +module LLVM_Extern_TargetParser_Gen { + textual header "llvm/TargetParser/RISCVTargetParserDef.inc" +} Index: llvm/include/llvm/module.extern.modulemap =================================================================== --- /dev/null +++ llvm/include/llvm/module.extern.modulemap @@ -1,6 +0,0 @@ -module LLVM_Extern_Config_Def {} -module LLVM_Extern_IR_Attributes_Gen {} -module LLVM_Extern_IR_Intrinsics_Gen {} -module LLVM_Extern_IR_Intrinsics_Enum {} -module LLVM_Extern_Utils_DataTypes {} -module LLVM_Extern_TargetParser_Gen {} Index: llvm/include/llvm/module.modulemap =================================================================== --- llvm/include/llvm/module.modulemap +++ /dev/null @@ -1,476 +0,0 @@ -module LLVM_Analysis { - requires cplusplus - umbrella "Analysis" - module * { export * } - - // This is intended for (repeated) textual inclusion. - textual header "Analysis/ScalarFuncs.def" - textual header "Analysis/TargetLibraryInfo.def" - textual header "Analysis/VecFuncs.def" -} - -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 * } - - // 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/LinkAllAsmWriterComponents.h" - exclude header "CodeGen/LinkAllCodegenComponents.h" - - exclude header "CodeGen/CodeGenPassBuilder.h" - - // These are intended for (repeated) textual inclusion. - textual header "CodeGen/DIEValue.def" - textual header "CodeGen/MachinePassRegistry.def" - } -} - -// FIXME: Make this as a submodule of LLVM_Backend again. -// Doing so causes a linker error in clang-format. -module LLVM_Backend_Target { - umbrella "Target" - module * { export * } -} - -module LLVM_Bitcode { - requires cplusplus - umbrella "Bitcode" - module * { export * } -} - -module LLVM_Bitstream { - requires cplusplus - umbrella "Bitstream" - module * { export * } -} - -module LLVM_BinaryFormat { - requires cplusplus - umbrella "BinaryFormat" module * { export * } - textual header "BinaryFormat/Dwarf.def" - textual header "BinaryFormat/DXContainerConstants.def" - textual header "BinaryFormat/DynamicTags.def" - textual header "BinaryFormat/MachO.def" - textual header "BinaryFormat/MinidumpConstants.def" - textual header "BinaryFormat/Swift.def" - textual header "BinaryFormat/ELFRelocs/AArch64.def" - textual header "BinaryFormat/ELFRelocs/AMDGPU.def" - textual header "BinaryFormat/ELFRelocs/ARM.def" - textual header "BinaryFormat/ELFRelocs/ARC.def" - textual header "BinaryFormat/ELFRelocs/AVR.def" - textual header "BinaryFormat/ELFRelocs/BPF.def" - textual header "BinaryFormat/ELFRelocs/CSKY.def" - textual header "BinaryFormat/ELFRelocs/Hexagon.def" - textual header "BinaryFormat/ELFRelocs/i386.def" - textual header "BinaryFormat/ELFRelocs/Lanai.def" - textual header "BinaryFormat/ELFRelocs/LoongArch.def" - textual header "BinaryFormat/ELFRelocs/M68k.def" - textual header "BinaryFormat/ELFRelocs/Mips.def" - textual header "BinaryFormat/ELFRelocs/MSP430.def" - textual header "BinaryFormat/ELFRelocs/PowerPC64.def" - textual header "BinaryFormat/ELFRelocs/PowerPC.def" - textual header "BinaryFormat/ELFRelocs/RISCV.def" - textual header "BinaryFormat/ELFRelocs/Sparc.def" - textual header "BinaryFormat/ELFRelocs/SystemZ.def" - textual header "BinaryFormat/ELFRelocs/VE.def" - textual header "BinaryFormat/ELFRelocs/x86_64.def" - textual header "BinaryFormat/ELFRelocs/Xtensa.def" - textual header "BinaryFormat/WasmRelocs.def" - textual header "BinaryFormat/MsgPack.def" -} - -module LLVM_Config { - requires cplusplus - umbrella "Config" - extern module LLVM_Extern_Config_Def "module.extern.modulemap" - module * { export * } -} - -module LLVM_DebugInfo { - requires cplusplus - module DIContext { header "DebugInfo/DIContext.h" export * } -} - -module LLVM_DebugInfo_DWARF { - requires cplusplus - - umbrella "DebugInfo/DWARF" - module * { export * } -} - -module LLVM_DebugInfo_PDB { - requires cplusplus - - umbrella "DebugInfo/PDB" - module * { export * } - - // Separate out this subdirectory; it's an optional component that depends on - // a separate library which might not be available. - // - // FIXME: There should be a better way to specify this. - exclude header "DebugInfo/PDB/DIA/DIADataStream.h" - exclude header "DebugInfo/PDB/DIA/DIAEnumDebugStreams.h" - exclude header "DebugInfo/PDB/DIA/DIAEnumFrameData.h" - exclude header "DebugInfo/PDB/DIA/DIAEnumInjectedSources.h" - exclude header "DebugInfo/PDB/DIA/DIAEnumLineNumbers.h" - exclude header "DebugInfo/PDB/DIA/DIAEnumSectionContribs.h" - exclude header "DebugInfo/PDB/DIA/DIAEnumSourceFiles.h" - exclude header "DebugInfo/PDB/DIA/DIAEnumSymbols.h" - exclude header "DebugInfo/PDB/DIA/DIAEnumTables.h" - exclude header "DebugInfo/PDB/DIA/DIAError.h" - exclude header "DebugInfo/PDB/DIA/DIAFrameData.h" - exclude header "DebugInfo/PDB/DIA/DIAInjectedSource.h" - exclude header "DebugInfo/PDB/DIA/DIALineNumber.h" - exclude header "DebugInfo/PDB/DIA/DIARawSymbol.h" - exclude header "DebugInfo/PDB/DIA/DIASectionContrib.h" - exclude header "DebugInfo/PDB/DIA/DIASession.h" - exclude header "DebugInfo/PDB/DIA/DIASourceFile.h" - exclude header "DebugInfo/PDB/DIA/DIASupport.h" - exclude header "DebugInfo/PDB/DIA/DIATable.h" - exclude header "DebugInfo/PDB/DIA/DIAUtils.h" -} - -module LLVM_DebugInfo_PDB_DIA { - requires cplusplus - - umbrella "DebugInfo/PDB/DIA" - module * { export * } -} - -module LLVM_DebugInfo_MSF { - requires cplusplus - - umbrella "DebugInfo/MSF" - module * { export * } -} - -module LLVM_DebugInfo_CodeView { - requires cplusplus - - umbrella "DebugInfo/CodeView" - module * { export * } - - // These are intended for (repeated) textual inclusion. - textual header "DebugInfo/CodeView/CodeViewRegisters.def" - textual header "DebugInfo/CodeView/CodeViewTypes.def" - textual header "DebugInfo/CodeView/CodeViewSymbols.def" -} - -module LLVM_DWARFLinker { - requires cplusplus - - umbrella "DWARFLinker" - 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/MCJIT.h" - exclude header "ExecutionEngine/Interpreter.h" - - // Exclude headers from LLVM_OrcSupport. - exclude header "ExecutionEngine/Orc/Shared/OrcError.h" -} - -module LLVM_FileCheck { - requires cplusplus - - umbrella "FileCheck" - module * { export * } -} - -module LLVM_Frontend_OpenMP { - requires cplusplus - - umbrella "Frontend/OpenMP" - module * { export * } - - exclude header "Frontend/OpenMP/OMPKinds.def" -} - -// Orc utilities that don't depend only on Support (not ExecutionEngine or -// IR). This is a workaround for ExecutionEngine's broken layering, and will -// be removed in the future. -module LLVM_OrcSupport { - requires cplusplus - - header "ExecutionEngine/Orc/Shared/OrcError.h" - - export * -} - -module LLVM_Pass { - module Pass { - // PassSupport.h and PassAnalysisSupport.h are made available only through - // Pass.h. - header "Pass.h" - textual header "PassSupport.h" - textual header "PassAnalysisSupport.h" - export * - } - - module PassRegistry { header "PassRegistry.h" export * } - module InitializePasses { header "InitializePasses.h" export * } -} - -module LLVM_intrinsic_gen { - requires cplusplus - - // Delay building the modules containing dependencies to Attributes.h and - // Intrinsics.h because they need to be generated by tablegen first. - - // Attributes.h - module IR_Argument { header "IR/Argument.h" export * } - module IR_Attributes { - header "IR/Attributes.h" - extern module LLVM_Extern_IR_Attributes_Gen "module.extern.modulemap" - export * - } - module IR_AbstractCallSite { header "IR/AbstractCallSite.h" export * } - module IR_ConstantFold { header "IR/ConstantFold.h" export * } - module IR_ConstantFolder { header "IR/ConstantFolder.h" export * } - module IR_GlobalVariable { header "IR/GlobalVariable.h" export * } - module IR_NoFolder { header "IR/NoFolder.h" export * } - module IRBuilderFolder { header "IR/IRBuilderFolder.h" export * } - module IR_Module { header "IR/Module.h" export * } - module IR_ModuleSummaryIndex { header "IR/ModuleSummaryIndex.h" export * } - module IR_ModuleSummaryIndexYAML { header "IR/ModuleSummaryIndexYAML.h" export * } - module IR_Function { header "IR/Function.h" export * } - module IR_InstrTypes { header "IR/InstrTypes.h" export * } - module IR_Instructions { header "IR/Instructions.h" export * } - module IR_TypeFinder { header "IR/TypeFinder.h" export * } - module IR_VectorBuilder { header "IR/VectorBuilder.h" export * } - - - // Intrinsics.h - module IR_CFG { header "IR/CFG.h" export * } - module IR_ConstantRange { header "IR/ConstantRange.h" export * } - module IR_Dominators { header "IR/Dominators.h" export * } - module IR_FixedPointBuilder { header "IR/FixedPointBuilder.h" export * } - module Analysis_PostDominators { header "Analysis/PostDominators.h" export * } - module Analysis_DomTreeUpdater { header "Analysis/DomTreeUpdater.h" export * } - module IR_IRBuilder { header "IR/IRBuilder.h" export * } - module IR_IRPrintingPasses { header "IR/IRPrintingPasses.h" export * } - module IR_MatrixBuilder { header "IR/MatrixBuilder.h" export * } - module IR_PassManager { header "IR/PassManager.h" export * } - module IR_PassManagerImpl { header "IR/PassManagerImpl.h" export * } - module IR_PredIteratorCache { header "IR/PredIteratorCache.h" export * } - module IR_Verifier { header "IR/Verifier.h" export * } - module IR_InstIterator { header "IR/InstIterator.h" export * } - module IR_InstVisitor { header "IR/InstVisitor.h" export * } - module IR_Intrinsics { - header "IR/Intrinsics.h" - extern module LLVM_Extern_IR_Intricsics_Gen "module.extern.modulemap" - extern module LLVM_Extern_IR_Intrinsics_Enum "module.extern.modulemap" - export * - } - module IR_IntrinsicInst { header "IR/IntrinsicInst.h" export * } - module IR_PatternMatch { header "IR/PatternMatch.h" export * } - module IR_SafepointIRVerifier { header "IR/SafepointIRVerifier.h" export * } - module IR_Statepoint { header "IR/Statepoint.h" export * } - module IR_DebugInfo { header "IR/DebugInfo.h" export * } - - export * -} - -module LLVM_IR { - requires cplusplus - - umbrella "IR" - module * { export * } - - // These are intended for (repeated) textual inclusion. - textual header "IR/ConstrainedOps.def" - textual header "IR/DebugInfoFlags.def" - textual header "IR/Instruction.def" - textual header "IR/Metadata.def" - textual header "IR/FixedMetadataKinds.def" - textual header "IR/Value.def" - textual header "IR/VPIntrinsics.def" - textual header "IR/RuntimeLibcalls.def" -} - -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 - - umbrella "MC" - module * { export * } -} - -// Used by llvm-tblgen -module LLVM_MC_TableGen { - requires cplusplus - module MC_LaneBitmask { header "MC/LaneBitmask.h" export * } - module MC_InstrItineraries { header "MC/MCInstrItineraries.h" export * } - module MC_Schedule { header "MC/MCSchedule.h" export * } - module MC_SubtargetFeature { header "MC/SubtargetFeature.h" export * } -} - -module LLVM_Object { - requires cplusplus - umbrella "Object" - module * { export * } -} - -module LLVM_Option { - requires cplusplus - umbrella "Option" - module * { export * } -} - -module LLVM_ProfileData { - requires cplusplus - - umbrella "ProfileData" - module * { export * } - - textual header "ProfileData/InstrProfData.inc" - textual header "ProfileData/MemProfData.inc" - textual header "ProfileData/MIBEntryDef.inc" -} - -// FIXME: Mislayered? -module LLVM_Support_TargetRegistry { - requires cplusplus - header "Support/TargetRegistry.h" - export * -} - -module LLVM_TableGen { - requires cplusplus - umbrella "TableGen" - module * { export * } -} - -module LLVM_Transforms { - requires cplusplus - umbrella "Transforms" - - module * { export * } - - // Requires DEBUG_TYPE to be defined by including file. - exclude header "Transforms/Utils/InstructionWorklist.h" -} - -extern module LLVM_Extern_Utils_DataTypes "module.extern.modulemap" - -// Build the module with the tablegen-generated files needed by the -// TargetParser module before building the TargetParser module itself. -module TargetParserGen { - module RISCVTargetParserDef { - header "TargetParser/RISCVTargetParser.h" - extern module LLVM_Extern_TargetParser_Gen "module.extern.modulemap" - export * - } -} - -// 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 Demangle { - requires cplusplus - - umbrella "Demangle" - module * { export * } - - textual header "Demangle/ItaniumNodes.def" - } - - module Support { - requires cplusplus - - umbrella "Support" - module * { export * } - - // Exclude this; deprecated. - exclude header "Support/Host.h" - - // Exclude this; it should only be used on Windows. - exclude header "Support/Windows/WindowsSupport.h" - - // Exclude these; they are fundamentally non-modular. - exclude header "Support/PluginLoader.h" - exclude header "Support/Solaris/sys/regset.h" - textual header "Support/TargetOpcodes.def" - - } - - module TargetParser { - requires cplusplus - - umbrella "TargetParser" - module * { export * } - - // These are intended for textual inclusion. - textual header "TargetParser/ARMTargetParser.def" - textual header "TargetParser/CSKYTargetParser.def" - textual header "TargetParser/X86TargetParser.def" - textual header "TargetParser/LoongArchTargetParser.def" - } - - // This part of the module is usable from both C and C++ code. - module ConvertUTF { - header "Support/ConvertUTF.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 * -} - -module LLVM_WindowsManifest { - requires cplusplus - umbrella "WindowsManifest" - module * { export * } -} Index: llvm/include/llvm/module.install.modulemap =================================================================== --- llvm/include/llvm/module.install.modulemap +++ /dev/null @@ -1,31 +0,0 @@ - -module LLVM_Extern_Config_Def { - textual header "Config/AsmParsers.def" - textual header "Config/AsmPrinters.def" - textual header "Config/Disassemblers.def" - textual header "Config/Targets.def" - export * -} - -module LLVM_Extern_IR_Attributes_Gen { - textual header "IR/Attributes.gen" - textual header "IR/Attributes.inc" -} - -module LLVM_Extern_IR_Intrinsics_Gen { - textual header "IR/Intrinsics.gen" - textual header "IR/Intrinsics.inc" -} - -module LLVM_Extern_IR_Intrinsics_Enum { - textual header "IR/IntrinsicEnums.inc" -} - -module LLVM_Extern_Utils_DataTypes { - header "Support/DataTypes.h" - export * -} - -module LLVM_Extern_TargetParser_Gen { - textual header "TargetParser/RISCVTargetParserDef.inc" -} Index: llvm/include/llvm-c/module.modulemap =================================================================== --- llvm/include/llvm-c/module.modulemap +++ /dev/null @@ -1,4 +0,0 @@ -module LLVM_C { - umbrella "." - module * { export * } -} Index: llvm/include/llvm/CMakeLists.txt =================================================================== --- llvm/include/llvm/CMakeLists.txt +++ llvm/include/llvm/CMakeLists.txt @@ -2,9 +2,3 @@ add_subdirectory(Support) add_subdirectory(Frontend) add_subdirectory(TargetParser) - -# If we're doing an out-of-tree build, copy a module map for generated -# header files into the build area. -if (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") - configure_file(module.modulemap.build module.modulemap COPYONLY) -endif (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") Index: llvm/include/CMakeLists.txt =================================================================== --- llvm/include/CMakeLists.txt +++ llvm/include/CMakeLists.txt @@ -1,7 +1,4 @@ -add_subdirectory(IR) -add_subdirectory(Support) -add_subdirectory(Frontend) -add_subdirectory(TargetParser) +add_subdirectory(llvm) # If we're doing an out-of-tree build, copy a module map for generated # header files into the build area. Index: llvm/CMakeLists.txt =================================================================== --- llvm/CMakeLists.txt +++ llvm/CMakeLists.txt @@ -1163,7 +1163,7 @@ add_subdirectory(utils/TableGen) -add_subdirectory(include/llvm) +add_subdirectory(include) add_subdirectory(lib) @@ -1275,14 +1275,14 @@ ) if (LLVM_INSTALL_MODULEMAPS) - install(DIRECTORY include/llvm include/llvm-c + install(DIRECTORY include DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" COMPONENT llvm-headers FILES_MATCHING PATTERN "module.modulemap" ) - install(FILES include/llvm/module.install.modulemap - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/llvm" + install(FILES include/module.install.modulemap + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" COMPONENT llvm-headers RENAME "module.extern.modulemap" ) Index: lldb/include/module.modulemap =================================================================== --- /dev/null +++ lldb/include/module.modulemap @@ -0,0 +1,142 @@ + +module lldb_API { + requires cplusplus + + textual header "lldb/Utility/Instrumentation.h" + + umbrella "lldb/API" + module * { export * } +} + +module lldb_Host { + requires cplusplus + + // Because we have OS-specific headers in Host, we just list + // all OS-independent headers here that will include the correct + // OS-specific header for us. + module ConnectionFileDescriptor { header "lldb/Host/ConnectionFileDescriptor.h" export * } + module Debug { header "lldb/Host/Debug.h" export * } + module Editline { header "lldb/Host/Editline.h" export * } + module FileCache { header "lldb/Host/FileCache.h" export * } + module File { header "lldb/Host/File.h" export * } + module FileAction { header "lldb/Host/FileAction.h" export * } + module FileSystem { header "lldb/Host/FileSystem.h" export * } + module HostGetOpt { header "lldb/Host/HostGetOpt.h" export * } + module Host { header "lldb/Host/Host.h" export * } + module HostInfoBase { header "lldb/Host/HostInfoBase.h" export * } + module HostInfo { header "lldb/Host/HostInfo.h" export * } + module HostNativeProcessBase { header "lldb/Host/HostNativeProcessBase.h" export * } + module HostNativeProcess { header "lldb/Host/HostNativeProcess.h" export * } + module HostNativeThreadBase { header "lldb/Host/HostNativeThreadBase.h" export * } + module HostNativeThreadForward { header "lldb/Host/HostNativeThreadForward.h" export * } + module HostNativeThread { header "lldb/Host/HostNativeThread.h" export * } + module HostProcess { header "lldb/Host/HostProcess.h" export * } + module HostThread { header "lldb/Host/HostThread.h" export * } + module LockFileBase { header "lldb/Host/LockFileBase.h" export * } + module LockFile { header "lldb/Host/LockFile.h" export * } + module MainLoopBase { header "lldb/Host/MainLoopBase.h" export * } + module MainLoop { header "lldb/Host/MainLoop.h" export * } + module MonitoringProcessLauncher { header "lldb/Host/MonitoringProcessLauncher.h" export * } + module OptionParser { header "lldb/Host/OptionParser.h" export * } + module PipeBase { header "lldb/Host/PipeBase.h" export * } + module Pipe { header "lldb/Host/Pipe.h" export * } + module PosixApi { header "lldb/Host/PosixApi.h" export * } + module ProcessLauncher { header "lldb/Host/ProcessLauncher.h" export * } + module ProcessLaunchInfo { header "lldb/Host/ProcessLaunchInfo.h" export * } + module ProcessRunLock { header "lldb/Host/ProcessRunLock.h" export * } + module PseudoTerminal { header "lldb/Host/PseudoTerminal.h" export * } + module SafeMachO { header "lldb/Host/SafeMachO.h" export * } + module SocketAddress { header "lldb/Host/SocketAddress.h" export * } + module Socket { header "lldb/Host/Socket.h" export * } + module Terminal { header "lldb/Host/Terminal.h" export * } + module ThreadLauncher { header "lldb/Host/ThreadLauncher.h" export * } + module Time { header "lldb/Host/Time.h" export * } + module XML { header "lldb/Host/XML.h" export * } + + module common { + umbrella "lldb/Host/common" + module * { export * } + } + + export * +} + +module lldb_Initialization { + requires cplusplus + + umbrella "lldb/Initialization" + module * { export * } +} + + +module lldb_Wrapper { + + module lldb_Breakpoint { + requires cplusplus + + umbrella "lldb/Breakpoint" + module * { export * } + } + + module lldb_Core { + requires cplusplus + + umbrella "lldb/Core" + module * { export * } + } + + module lldb_DataFormatters { + requires cplusplus + + umbrella "lldb/DataFormatters" + module * { export * } + } + + module lldb_Expression { + requires cplusplus + + umbrella "lldb/Expression" + module * { export * } + } + + module lldb_Interpreter { + requires cplusplus + + umbrella "lldb/Interpreter" + module * { export * } + } + + module lldb_Symbol { + requires cplusplus + + umbrella "lldb/Symbol" + module * { export * } + } + module lldb_Target { + requires cplusplus + + umbrella "lldb/Target" + textual header "lldb/Target/AppleArm64ExceptionClass.def" + module * { export * } + } +} + + +module lldb_Utility { + requires cplusplus + + umbrella "lldb/Utility" + module * { export * } + + module lldb_defines { header "lldb/lldb-defines.h" export * } + module lldb_enumerations { header "lldb/lldb-enumerations.h" export * } + module lldb_forward { header "lldb/lldb-forward.h" export * } + module lldb_private_enumerations { header "lldb/lldb-private-enumerations.h" export * } + module lldb_private_forward { header "lldb/lldb-private-forward.h" export * } + module lldb_private { header "lldb/lldb-private.h" export * } + module lldb_private_interfaces { header "lldb/lldb-private-interfaces.h" export * } + module lldb_private_types { header "lldb/lldb-private-types.h" export * } + module lldb_public { header "lldb/lldb-public.h" export * } + module lldb_types { header "lldb/lldb-types.h" export * } + module lldb_versioning { header "lldb/lldb-versioning.h" export * } +} Index: lldb/include/lldb/module.modulemap =================================================================== --- lldb/include/lldb/module.modulemap +++ /dev/null @@ -1,142 +0,0 @@ - -module lldb_API { - requires cplusplus - - textual header "Utility/Instrumentation.h" - - umbrella "API" - module * { export * } -} - -module lldb_Host { - requires cplusplus - - // Because we have OS-specific headers in Host, we just list - // all OS-independent headers here that will include the correct - // OS-specific header for us. - module ConnectionFileDescriptor { header "Host/ConnectionFileDescriptor.h" export * } - module Debug { header "Host/Debug.h" export * } - module Editline { header "Host/Editline.h" export * } - module FileCache { header "Host/FileCache.h" export * } - module File { header "Host/File.h" export * } - module FileAction { header "Host/FileAction.h" export * } - module FileSystem { header "Host/FileSystem.h" export * } - module HostGetOpt { header "Host/HostGetOpt.h" export * } - module Host { header "Host/Host.h" export * } - module HostInfoBase { header "Host/HostInfoBase.h" export * } - module HostInfo { header "Host/HostInfo.h" export * } - module HostNativeProcessBase { header "Host/HostNativeProcessBase.h" export * } - module HostNativeProcess { header "Host/HostNativeProcess.h" export * } - module HostNativeThreadBase { header "Host/HostNativeThreadBase.h" export * } - module HostNativeThreadForward { header "Host/HostNativeThreadForward.h" export * } - module HostNativeThread { header "Host/HostNativeThread.h" export * } - module HostProcess { header "Host/HostProcess.h" export * } - module HostThread { header "Host/HostThread.h" export * } - module LockFileBase { header "Host/LockFileBase.h" export * } - module LockFile { header "Host/LockFile.h" export * } - module MainLoopBase { header "Host/MainLoopBase.h" export * } - module MainLoop { header "Host/MainLoop.h" export * } - module MonitoringProcessLauncher { header "Host/MonitoringProcessLauncher.h" export * } - module OptionParser { header "Host/OptionParser.h" export * } - module PipeBase { header "Host/PipeBase.h" export * } - module Pipe { header "Host/Pipe.h" export * } - module PosixApi { header "Host/PosixApi.h" export * } - module ProcessLauncher { header "Host/ProcessLauncher.h" export * } - module ProcessLaunchInfo { header "Host/ProcessLaunchInfo.h" export * } - module ProcessRunLock { header "Host/ProcessRunLock.h" export * } - module PseudoTerminal { header "Host/PseudoTerminal.h" export * } - module SafeMachO { header "Host/SafeMachO.h" export * } - module SocketAddress { header "Host/SocketAddress.h" export * } - module Socket { header "Host/Socket.h" export * } - module Terminal { header "Host/Terminal.h" export * } - module ThreadLauncher { header "Host/ThreadLauncher.h" export * } - module Time { header "Host/Time.h" export * } - module XML { header "Host/XML.h" export * } - - module common { - umbrella "Host/common" - module * { export * } - } - - export * -} - -module lldb_Initialization { - requires cplusplus - - umbrella "Initialization" - module * { export * } -} - - -module lldb_Wrapper { - - module lldb_Breakpoint { - requires cplusplus - - umbrella "Breakpoint" - module * { export * } - } - - module lldb_Core { - requires cplusplus - - umbrella "Core" - module * { export * } - } - - module lldb_DataFormatters { - requires cplusplus - - umbrella "DataFormatters" - module * { export * } - } - - module lldb_Expression { - requires cplusplus - - umbrella "Expression" - module * { export * } - } - - module lldb_Interpreter { - requires cplusplus - - umbrella "Interpreter" - module * { export * } - } - - module lldb_Symbol { - requires cplusplus - - umbrella "Symbol" - module * { export * } - } - module lldb_Target { - requires cplusplus - - umbrella "Target" - textual header "Target/AppleArm64ExceptionClass.def" - module * { export * } - } -} - - -module lldb_Utility { - requires cplusplus - - umbrella "Utility" - module * { export * } - - module lldb_defines { header "lldb-defines.h" export * } - module lldb_enumerations { header "lldb-enumerations.h" export * } - module lldb_forward { header "lldb-forward.h" export * } - module lldb_private_enumerations { header "lldb-private-enumerations.h" export * } - module lldb_private_forward { header "lldb-private-forward.h" export * } - module lldb_private { header "lldb-private.h" export * } - module lldb_private_interfaces { header "lldb-private-interfaces.h" export * } - module lldb_private_types { header "lldb-private-types.h" export * } - module lldb_public { header "lldb-public.h" export * } - module lldb_types { header "lldb-types.h" export * } - module lldb_versioning { header "lldb-versioning.h" export * } -} Index: clang/include/module.modulemap =================================================================== --- /dev/null +++ clang/include/module.modulemap @@ -0,0 +1,204 @@ +module Clang_C { + umbrella "clang-c" + module * { export * } +} + +module Clang_Analysis { + requires cplusplus + umbrella "clang/Analysis" + + textual header "clang/Analysis/Analyses/ThreadSafetyOps.def" + + module * { export * } + + // FIXME: Exclude these headers to avoid pulling all of the AST matchers + // library into clang. Due to inline key functions in the headers, + // importing the AST matchers library gives a link dependency on the AST + // matchers (and thus the AST), which clang-format should not have. + exclude header "clang/Analysis/Analyses/ExprMutationAnalyzer.h" +} + +module Clang_AST { + requires cplusplus + umbrella "clang/AST" + + textual header "clang/AST/BuiltinTypes.def" + textual header "clang/AST/CXXRecordDeclDefinitionBits.def" + textual header "clang/AST/OperationKinds.def" + textual header "clang/AST/TypeLocNodes.def" + + module * { export * } +} + +module Clang_ASTMatchers { requires cplusplus umbrella "clang/ASTMatchers" module * { export * } } + +module Clang_Basic { + requires cplusplus + umbrella "clang/Basic" + + textual header "clang/Basic/AArch64SVEACLETypes.def" + textual header "clang/Basic/BuiltinsAArch64.def" + textual header "clang/Basic/BuiltinsAMDGPU.def" + textual header "clang/Basic/BuiltinsAArch64NeonSVEBridge.def" + textual header "clang/Basic/BuiltinsAArch64NeonSVEBridge_cg.def" + textual header "clang/Basic/BuiltinsARM.def" + textual header "clang/Basic/BuiltinsBPF.def" + textual header "clang/Basic/Builtins.def" + textual header "clang/Basic/BuiltinHeaders.def" + textual header "clang/Basic/BuiltinsHexagon.def" + textual header "clang/Basic/BuiltinsHexagonDep.def" + textual header "clang/Basic/BuiltinsHexagonMapCustomDep.def" + textual header "clang/Basic/BuiltinsLoongArch.def" + textual header "clang/Basic/BuiltinsMips.def" + textual header "clang/Basic/BuiltinsNEON.def" + textual header "clang/Basic/BuiltinsNVPTX.def" + textual header "clang/Basic/BuiltinsPPC.def" + textual header "clang/Basic/BuiltinsRISCV.def" + textual header "clang/Basic/BuiltinsRISCVVector.def" + textual header "clang/Basic/BuiltinsSVE.def" + textual header "clang/Basic/BuiltinsSystemZ.def" + textual header "clang/Basic/BuiltinsVE.def" + textual header "clang/Basic/BuiltinsVEVL.gen.def" + textual header "clang/Basic/BuiltinsWebAssembly.def" + textual header "clang/Basic/BuiltinsX86.def" + textual header "clang/Basic/BuiltinsX86_64.def" + textual header "clang/Basic/BuiltinsXCore.def" + textual header "clang/Basic/CodeGenOptions.def" + textual header "clang/Basic/DiagnosticOptions.def" + textual header "clang/Basic/Features.def" + textual header "clang/Basic/FPOptions.def" + textual header "clang/Basic/MSP430Target.def" + textual header "clang/Basic/LangOptions.def" + textual header "clang/Basic/OpenCLExtensions.def" + textual header "clang/Basic/OpenCLImageTypes.def" + textual header "clang/Basic/OpenCLExtensionTypes.def" + textual header "clang/Basic/OpenMPKinds.def" + textual header "clang/Basic/OperatorKinds.def" + textual header "clang/Basic/PPCTypes.def" + textual header "clang/Basic/RISCVVTypes.def" + textual header "clang/Basic/Sanitizers.def" + textual header "clang/Basic/TargetCXXABI.def" + textual header "clang/Basic/TransformTypeTraits.def" + textual header "clang/Basic/TokenKinds.def" + textual header "clang/Basic/WebAssemblyReferenceTypes.def" + + module * { export * } +} +module Clang_Basic_TokenKinds { + requires cplusplus + + header "clang/Basic/TokenKinds.h" + textual header "clang/Basic/TokenKinds.def" + + export * +} + +module Clang_CodeGen { requires cplusplus umbrella "clang/CodeGen" module * { export * } } +module Clang_Config { requires cplusplus umbrella "clang/Config" module * { export * } } + +// Files for diagnostic groups are spread all over the include/clang/ tree, but +// logically form a single module. +module Clang_Diagnostics { + requires cplusplus + + module All { header "clang/Basic/AllDiagnostics.h" export * } + module Analysis { textual header "clang/Analysis/Analyses/UnsafeBufferUsageGadgets.def" } + module AST { header "clang/AST/ASTDiagnostic.h" export * } + module Comment { header "clang/AST/CommentDiagnostic.h" export * } + module Driver { header "clang/Driver/DriverDiagnostic.h" export * } + module Frontend { header "clang/Frontend/FrontendDiagnostic.h" export * } + module Lex { header "clang/Lex/LexDiagnostic.h" export * } + module Parse { header "clang/Parse/ParseDiagnostic.h" export * } + module Sema { header "clang/Sema/SemaDiagnostic.h" export * } + module Serialization { header "clang/Serialization/SerializationDiagnostic.h" export * } + module Refactoring { header "clang/Tooling/Refactoring/RefactoringDiagnostic.h" export * } +} + +module Clang_Driver { + requires cplusplus + umbrella "clang/Driver" + + textual header "clang/Driver/Types.def" + + module * { export * } +} + +module Clang_Edit { requires cplusplus umbrella "clang/Edit" module * { export * } } +module Clang_Format { requires cplusplus umbrella "clang/Format" module * { export * } } + +module Clang_Frontend { + requires cplusplus + umbrella "clang/Frontend" + + textual header "clang/Basic/LangStandards.def" + + module * { export * } +} + +module Clang_FrontendTool { requires cplusplus umbrella "clang/FrontendTool" module * { export * } } +module Clang_Index { requires cplusplus umbrella "clang/Index" module * { export * } } +module Clang_Lex { requires cplusplus umbrella "clang/Lex" module * { export * } } +module Clang_Parse { requires cplusplus umbrella "clang/Parse" module * { export * } } +module Clang_Rewrite { requires cplusplus umbrella "clang/Rewrite/Core" module * { export * } } +module Clang_RewriteFrontend { requires cplusplus umbrella "clang/Rewrite/Frontend" module * { export * } } +module Clang_Sema { requires cplusplus umbrella "clang/Sema" module * { export * } } + +module Clang_Serialization { + requires cplusplus + umbrella "clang/Serialization" + + textual header "clang/Serialization/TypeBitCodes.def" + + module * { export * } +} + +module Clang_StaticAnalyzer_Core { + requires cplusplus + umbrella "clang/StaticAnalyzer/Core" + + textual header "clang/StaticAnalyzer/Core/Analyses.def" + textual header "clang/StaticAnalyzer/Core/AnalyzerOptions.def" + textual header "clang/StaticAnalyzer/Core/PathSensitive/SVals.def" + textual header "clang/StaticAnalyzer/Core/PathSensitive/Symbols.def" + textual header "clang/StaticAnalyzer/Core/PathSensitive/Regions.def" + + module * { export * } +} + +module Clang_StaticAnalyzer_Checkers { + requires cplusplus + umbrella "clang/StaticAnalyzer/Checkers" + module * { export * } +} + +module Clang_StaticAnalyzer_Frontend { + requires cplusplus + umbrella "clang/StaticAnalyzer/Frontend" + module * { export * } +} + +module Clang_Testing { + requires cplusplus + umbrella "clang/Testing" + module * { export * } +} + +module Clang_Tooling { + requires cplusplus umbrella "clang/Tooling" module * { export * } + // FIXME: Exclude these headers to avoid pulling all of the AST matchers + // library into clang-format. Due to inline key functions in the headers, + // importing the AST matchers library gives a link dependency on the AST + // matchers (and thus the AST), which clang-format should not have. + exclude header "clang/Tooling/RefactoringCallbacks.h" +} + +module Clang_ToolingCore { + requires cplusplus + umbrella "clang/Tooling/Core" module * { export * } +} + +module Clang_ToolingInclusions { + requires cplusplus + umbrella "clang/Tooling/Inclusions" + module * { export * } +} Index: clang/include/clang/module.modulemap =================================================================== --- clang/include/clang/module.modulemap +++ /dev/null @@ -1,199 +0,0 @@ -module Clang_Analysis { - requires cplusplus - umbrella "Analysis" - - textual header "Analysis/Analyses/ThreadSafetyOps.def" - - module * { export * } - - // FIXME: Exclude these headers to avoid pulling all of the AST matchers - // library into clang. Due to inline key functions in the headers, - // importing the AST matchers library gives a link dependency on the AST - // matchers (and thus the AST), which clang-format should not have. - exclude header "Analysis/Analyses/ExprMutationAnalyzer.h" -} - -module Clang_AST { - requires cplusplus - umbrella "AST" - - textual header "AST/BuiltinTypes.def" - textual header "AST/CXXRecordDeclDefinitionBits.def" - textual header "AST/OperationKinds.def" - textual header "AST/TypeLocNodes.def" - - module * { export * } -} - -module Clang_ASTMatchers { requires cplusplus umbrella "ASTMatchers" module * { export * } } - -module Clang_Basic { - requires cplusplus - umbrella "Basic" - - textual header "Basic/AArch64SVEACLETypes.def" - textual header "Basic/BuiltinsAArch64.def" - textual header "Basic/BuiltinsAMDGPU.def" - textual header "Basic/BuiltinsAArch64NeonSVEBridge.def" - textual header "Basic/BuiltinsAArch64NeonSVEBridge_cg.def" - textual header "Basic/BuiltinsARM.def" - textual header "Basic/BuiltinsBPF.def" - textual header "Basic/Builtins.def" - textual header "Basic/BuiltinHeaders.def" - textual header "Basic/BuiltinsHexagon.def" - textual header "Basic/BuiltinsHexagonDep.def" - textual header "Basic/BuiltinsHexagonMapCustomDep.def" - textual header "Basic/BuiltinsLoongArch.def" - textual header "Basic/BuiltinsMips.def" - textual header "Basic/BuiltinsNEON.def" - textual header "Basic/BuiltinsNVPTX.def" - textual header "Basic/BuiltinsPPC.def" - textual header "Basic/BuiltinsRISCV.def" - textual header "Basic/BuiltinsRISCVVector.def" - textual header "Basic/BuiltinsSVE.def" - textual header "Basic/BuiltinsSystemZ.def" - textual header "Basic/BuiltinsVE.def" - textual header "Basic/BuiltinsVEVL.gen.def" - textual header "Basic/BuiltinsWebAssembly.def" - textual header "Basic/BuiltinsX86.def" - textual header "Basic/BuiltinsX86_64.def" - textual header "Basic/BuiltinsXCore.def" - textual header "Basic/CodeGenOptions.def" - textual header "Basic/DiagnosticOptions.def" - textual header "Basic/Features.def" - textual header "Basic/FPOptions.def" - textual header "Basic/MSP430Target.def" - textual header "Basic/LangOptions.def" - textual header "Basic/OpenCLExtensions.def" - textual header "Basic/OpenCLImageTypes.def" - textual header "Basic/OpenCLExtensionTypes.def" - textual header "Basic/OpenMPKinds.def" - textual header "Basic/OperatorKinds.def" - textual header "Basic/PPCTypes.def" - textual header "Basic/RISCVVTypes.def" - textual header "Basic/Sanitizers.def" - textual header "Basic/TargetCXXABI.def" - textual header "Basic/TransformTypeTraits.def" - textual header "Basic/TokenKinds.def" - textual header "Basic/WebAssemblyReferenceTypes.def" - - module * { export * } -} -module Clang_Basic_TokenKinds { - requires cplusplus - - header "Basic/TokenKinds.h" - textual header "Basic/TokenKinds.def" - - export * -} - -module Clang_CodeGen { requires cplusplus umbrella "CodeGen" module * { export * } } -module Clang_Config { requires cplusplus umbrella "Config" module * { export * } } - -// Files for diagnostic groups are spread all over the include/clang/ tree, but -// logically form a single module. -module Clang_Diagnostics { - requires cplusplus - - module All { header "Basic/AllDiagnostics.h" export * } - module Analysis { textual header "Analysis/Analyses/UnsafeBufferUsageGadgets.def" } - module AST { header "AST/ASTDiagnostic.h" export * } - module Comment { header "AST/CommentDiagnostic.h" export * } - module Driver { header "Driver/DriverDiagnostic.h" export * } - module Frontend { header "Frontend/FrontendDiagnostic.h" export * } - module Lex { header "Lex/LexDiagnostic.h" export * } - module Parse { header "Parse/ParseDiagnostic.h" export * } - module Sema { header "Sema/SemaDiagnostic.h" export * } - module Serialization { header "Serialization/SerializationDiagnostic.h" export * } - module Refactoring { header "Tooling/Refactoring/RefactoringDiagnostic.h" export * } -} - -module Clang_Driver { - requires cplusplus - umbrella "Driver" - - textual header "Driver/Types.def" - - module * { export * } -} - -module Clang_Edit { requires cplusplus umbrella "Edit" module * { export * } } -module Clang_Format { requires cplusplus umbrella "Format" module * { export * } } - -module Clang_Frontend { - requires cplusplus - umbrella "Frontend" - - textual header "Basic/LangStandards.def" - - module * { export * } -} - -module Clang_FrontendTool { requires cplusplus umbrella "FrontendTool" module * { export * } } -module Clang_Index { requires cplusplus umbrella "Index" module * { export * } } -module Clang_Lex { requires cplusplus umbrella "Lex" module * { export * } } -module Clang_Parse { requires cplusplus umbrella "Parse" module * { export * } } -module Clang_Rewrite { requires cplusplus umbrella "Rewrite/Core" module * { export * } } -module Clang_RewriteFrontend { requires cplusplus umbrella "Rewrite/Frontend" module * { export * } } -module Clang_Sema { requires cplusplus umbrella "Sema" module * { export * } } - -module Clang_Serialization { - requires cplusplus - umbrella "Serialization" - - textual header "Serialization/TypeBitCodes.def" - - module * { export * } -} - -module Clang_StaticAnalyzer_Core { - requires cplusplus - umbrella "StaticAnalyzer/Core" - - textual header "StaticAnalyzer/Core/Analyses.def" - textual header "StaticAnalyzer/Core/AnalyzerOptions.def" - textual header "StaticAnalyzer/Core/PathSensitive/SVals.def" - textual header "StaticAnalyzer/Core/PathSensitive/Symbols.def" - textual header "StaticAnalyzer/Core/PathSensitive/Regions.def" - - module * { export * } -} - -module Clang_StaticAnalyzer_Checkers { - requires cplusplus - umbrella "StaticAnalyzer/Checkers" - module * { export * } -} - -module Clang_StaticAnalyzer_Frontend { - requires cplusplus - umbrella "StaticAnalyzer/Frontend" - module * { export * } -} - -module Clang_Testing { - requires cplusplus - umbrella "Testing" - module * { export * } -} - -module Clang_Tooling { - requires cplusplus umbrella "Tooling" module * { export * } - // FIXME: Exclude these headers to avoid pulling all of the AST matchers - // library into clang-format. Due to inline key functions in the headers, - // importing the AST matchers library gives a link dependency on the AST - // matchers (and thus the AST), which clang-format should not have. - exclude header "Tooling/RefactoringCallbacks.h" -} - -module Clang_ToolingCore { - requires cplusplus - umbrella "Tooling/Core" module * { export * } -} - -module Clang_ToolingInclusions { - requires cplusplus - umbrella "Tooling/Inclusions" - module * { export * } -} Index: clang/include/clang-c/module.modulemap =================================================================== --- clang/include/clang-c/module.modulemap +++ /dev/null @@ -1,4 +0,0 @@ -module Clang_C { - umbrella "." - module * { export * } -}
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits