[clang] [Modules] Don't fail when an unused textual header is missing. (PR #138227)

Volodymyr Sapsai via cfe-commits cfe-commits at lists.llvm.org
Fri May 30 14:42:31 PDT 2025


vsapsai wrote:

I think I understand the logic behind your approach.
* Access between headers is enforced through decl-use, so you cannot access headers from a target that's not your direct dependency.
* But some headers shouldn't be accessed outside of a target [regardless of the dependencies], only inside the target. These become `private header`.
* Access to headers from .cc files is restricted through the used module maps and maybe through some Bazel sand-boxing. Doesn't particularly matter in this case.

And the same header in multiple modules just happened to be the case, it wasn't a deliberate design choice.

https://github.com/llvm/llvm-project/pull/138227


More information about the cfe-commits mailing list