[PATCH] D130935: [clang] Only modify FileEntryRef names that are externally remapped
Ben Barham via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 1 13:57:04 PDT 2022
bnbarham accepted this revision.
bnbarham added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clang/lib/Basic/FileManager.cpp:277-278
- if (Status.getName() == Filename) {
- // The name matches. Set the FileEntry.
+ if (Status.getName() == Filename || !Status.ExposesExternalVFSPath) {
+ // Use the requested name. Set the FileEntry.
NamedFileEnt->second = FileEntryRef::MapValue(*UFE, DirInfo);
----------------
Is it possible for an `ExposesExternalVFSPath` to have the same filename as the one that was requested? Just in the case of mapping `A -> A` or something equally pointless? Could check for that in the VFS, but probably doesn't matter in the long run.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130935/new/
https://reviews.llvm.org/D130935
More information about the cfe-commits
mailing list