[PATCH] D58497: Clear the KnownModules cache if the preprocessor is going away

Duncan P. N. Exon Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 3 20:44:45 PST 2019


dexonsmith abandoned this revision.
dexonsmith added a comment.

I just pushed 31e14f41a21f9016050a20f07d5da03db2e8c13e <https://reviews.llvm.org/rG31e14f41a21f9016050a20f07d5da03db2e8c13e>, which moves KnownModules into ModuleMap as an alternative.

In D58497#1648134 <https://reviews.llvm.org/D58497#1648134>, @rsmith wrote:

> Do we need `KnownModules` at all? It seems to serve a very similar purpose to the `Modules` string map on `ModuleMap`. (The main difference seems to be that `KnownModules` can cache module load failures.) If we can keep only a single data structure tracking this, owned by the `ModuleMap` (which also owns the modules), that should remove the possibility for dangling module pointers.


ModuleMap::Modules only has top-level modules, but KnownModules also indexes submodules.  I kept them both.


Repository:
  rC Clang

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

https://reviews.llvm.org/D58497





More information about the cfe-commits mailing list