[PATCH] D120569: [clang] Improve laziness of resolving module map headers.

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 27 08:13:29 PST 2022


kadircet accepted this revision.
kadircet added a comment.
This revision is now accepted and ready to land.

Thanks, this LGTM. but I am afraid all users of modules/modulemaps might not be aware of the fact that a module might be "partially" resolved (or still unresolved after a resolve operation, ASTWriter is a good example of an aware user).

For example there's Module::isAvailable <https://github.com/llvm/llvm-project/blob/main/clang/lib/Basic/Module.cpp#L164> that checks `MissingHeaders` in a module for unavailability. I am not sure if it's possible to get there without ever fully resolving a Module, but I couldn't prove otherwise either.
So this might cause surprising breakages or hide some diagnostics.

It would be great if you could test the change against LLVM or some other codebases with module enabled builds to see nothing crashes. Also we should probably be on the watch out after landing this for possible complaints from outside.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120569



More information about the cfe-commits mailing list