[PATCH] D33703: Support lazy stat'ing of files referenced by module maps

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 1 17:07:37 PDT 2017


rsmith added a comment.

In https://reviews.llvm.org/D33703#770896, @bruno wrote:

> - I've noticed in the patch that on the ASTWriter side we serialize the introduced size / mtime, but there are no changes to the ASTReader, so I assume in the reader side you still need the module map around to fetch those infos, right?


On the reader side, we already support the case where the module map is absent, and already use the size / mtime as a key for `HeaderFileInfo` lookups, and when reading the SUBMODULE records we don't actually read the header file list at all, instead taking the relevant information from the `HeaderFileInfo` lookups. As a consequence, no changes to the reader are required.

> - Does this patch provide any benefits for the case where we don't provide a size / mtime for the header in the module map? Since Size / ModTime are only updated when parsing the module map I would assume no, but I might have missed something.

No, it shouldn't change anything in the case where neither size nor mtime are provided. In those cases, we still eagerly stat the header so we can try to match later `#include`d files against it.


Repository:
  rL LLVM

https://reviews.llvm.org/D33703





More information about the cfe-commits mailing list