[PATCH] D85981: [clang][Modules] Use File Names Instead of inodes As Loaded Module Keys

Robert Widmann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 15 19:35:34 PDT 2020


CodaFi added inline comments.


================
Comment at: clang/include/clang/Serialization/ModuleManager.h:62
 
-  /// All loaded modules, indexed by name.
-  llvm::DenseMap<const FileEntry *, ModuleFile *> Modules;
+  /// All loaded modules, indexed by file name.
+  llvm::StringMap<ModuleFile *> Modules;
----------------
aprantl wrote:
> aprantl wrote:
> > Is it literally the file name, or something like the absolute realpath? And just because I'm curious: Is this the name of the .pcm or of the module map file?
> I just realized @vsapsai already asked the same question :-)
It's the file path the module cache has computed for the PCM. I could try to use the real path to the file, but I'm not sure how portable/stable that interface is relative to this one.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85981



More information about the cfe-commits mailing list