[PATCH] D140420: [Support] Update modulemap for TargetParser

Sam Elliott via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 20 10:47:16 PST 2022


lenary created this revision.
Herald added subscribers: s.egerton, simoncook.
Herald added a project: All.
lenary requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead.
Herald added a project: LLVM.

This is a follow-up to 6bdf378dcd349d97152846bb687c1d1de511d138 <https://reviews.llvm.org/rG6bdf378dcd349d97152846bb687c1d1de511d138>, to show
that we did actually manage to split out TargetParser, but forwarding
headers still remain.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D140420

Files:
  llvm/include/llvm/module.modulemap


Index: llvm/include/llvm/module.modulemap
===================================================================
--- llvm/include/llvm/module.modulemap
+++ llvm/include/llvm/module.modulemap
@@ -398,6 +398,9 @@
 
     umbrella "ADT"
     module * { export * }
+
+    // Exclude this; it is a forwarding header to TargetParser.
+    exclude header "ADT/Triple.h"
   }
 
   module Support {
@@ -412,23 +415,22 @@
     // 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 * }
+    textual header "Support/TargetOpcodes.def"
 
-    // These are intended for textual inclusion.
-    textual header "TargetParser/AArch64TargetParser.def"
-    textual header "TargetParser/ARMTargetParser.def"
-    textual header "TargetParser/CSKYTargetParser.def"
-    textual header "TargetParser/RISCVTargetParser.def"
-    textual header "TargetParser/X86TargetParser.def"
-    textual header "TargetParser/LoongArchTargetParser.def"
+    // Exclude these; they are forwarding headers to TargetParser.
+    exclude header "Support/TargetParser.h"
+    exclude header "Support/AArch64TargetParser.h"
+    exclude header "Support/AArch64TargetParser.h"
+    exclude header "Support/ARMTargetParser.h"
+    exclude header "Support/ARMTargetParserCommon.h"
+    exclude header "Support/CSKYTargetParser.h"
+    exclude header "Support/Host.h"
+    exclude header "Support/LoongArchTargetParser.h"
+    exclude header "Support/RISCVISAInfo.h"
+    exclude header "Support/TargetParser.h"
+    exclude header "Support/X86TargetParser.def"
+    exclude header "Support/X86TargetParser.h"
   }
 
   // This part of the module is usable from both C and C++ code.
@@ -438,6 +440,21 @@
   }
 }
 
+module LLVM_TargetParser {
+  requires cplusplus
+
+  umbrella "TargetParser"
+  module * { export * }
+
+  // These are intended for textual inclusion.
+  textual header "TargetParser/AArch64TargetParser.def"
+  textual header "TargetParser/ARMTargetParser.def"
+  textual header "TargetParser/CSKYTargetParser.def"
+  textual header "TargetParser/RISCVTargetParser.def"
+  textual header "TargetParser/X86TargetParser.def"
+  textual header "TargetParser/LoongArchTargetParser.def"
+}
+
 // 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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140420.484322.patch
Type: text/x-patch
Size: 2577 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221220/ab761669/attachment.bin>


More information about the llvm-commits mailing list