[PATCH] D106876: Remove non-affecting module maps from PCM files.

Jan Svoboda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 19 11:26:34 PDT 2022


jansvoboda11 added inline comments.


================
Comment at: clang/lib/Serialization/ASTWriter.cpp:183-184
+        HS.getExistingFileInfo(File, /*WantExternal*/false);
+    if (!HFI || (HFI->isModuleHeader && !HFI->isCompilingModuleHeader))
+      continue;
+
----------------
rsmith wrote:
> I don't think this is right: I think we should consider every file that we've entered in this compilation, regardless of whether it's part of a module we're compiling. (We support modes where we'll enter modular headers despite not compiling them.) Can you replace this with just `if (!HFI) continue;` and still get the optimization you're looking for?
@rsmith It appears that between your approval and when the patch got committed, your suggested change was reverted. Can you please explain the situation where we enter modular headers without compiling them?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106876



More information about the cfe-commits mailing list