[PATCH] D85981: [clang][Modules] Use File Names Instead of inodes As Loaded Module Keys
Adrian Prantl via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 18 13:39:07 PDT 2020
aprantl 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;
----------------
CodaFi wrote:
> 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.
If it's the path to the `.pcm` there's no point in wasting time on realpath — there should only be one module cache path and we don't care where exactly it is on disk, and the paths inside the module cache ought to be unique anyway, because we just computed them. Thanks!
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