[PATCH] D109128: [VFS] Use original path when falling back to external FS

Volodymyr Sapsai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 2 17:39:35 PDT 2021


vsapsai added a comment.

Was looking at an issue caused by over-eager RedirectingFileSystem path canonicalization and this patch fixes it. The repro we have is more complicated (involves 3 modules), so I don't think it is worth including with this change.



================
Comment at: llvm/lib/Support/VirtualFileSystem.cpp:2006
 ErrorOr<std::unique_ptr<File>>
 RedirectingFileSystem::openFileForRead(const Twine &Path_) {
   SmallString<256> Path;
----------------
dexonsmith wrote:
> I suggest giving this a real name if it's being used for anything. Maybe `PathAsWritten`?
Another idea is to keep this variable `Path` and rename old Path to `CanonicalPath`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109128



More information about the cfe-commits mailing list