benlangmuir added inline comments.
================ 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); ---------------- bnbarham wrote: > 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. I think in practice it won't happen, but in theory the VFS can do whatever it wants, so I didn't want to introduce any possibility of circularity here. I will flip these checks so the boolean comes before the string compare though, since that will be cheaper. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130935/new/ https://reviews.llvm.org/D130935 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits