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

Steven Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 20 15:07:54 PST 2022


steven_wu added inline comments.


================
Comment at: llvm/include/llvm/module.modulemap:403
+    // Exclude this; it is a forwarding header to TargetParser.
+    exclude header "ADT/Triple.h"
   }
----------------
lenary wrote:
> steven_wu wrote:
> > I am not sure if this exclude is necessary. It is ok for ADT to depend on TargetParser, correct?
> > 
> > We should either clean up all the include through ADT, or maybe just leave this. Same for all the TargetParser header in Support.
> I got build issues until I added this. The `llvm/ADT/Triple.h` file now just forwards to `llvm/TargetParser/Triple.h`, so without this, you get a circular dependency of LLVM_Support -> TargetParser -> LLVM_Support
But isn't Triple.h module dependency: ADT -> TargetParser? I don't see an edge goes back.

For the rest of the TargetParser headers, that could be a problem. What prevents us from just rewrite all the includes to use the new location and remove those forwarding headers? Just excluding here without including them in a different module still means they cannot be used in a module build.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140420/new/

https://reviews.llvm.org/D140420



More information about the llvm-commits mailing list