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

Keith Smiley via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 14 16:41:29 PDT 2021


keith added inline comments.


================
Comment at: llvm/lib/Support/VirtualFileSystem.cpp:1179-1180
 
+  if (ExternalFS)
+    ExternalFS->setCurrentWorkingDirectory(Path);
+
----------------
JDevlieghere wrote:
> I'm pretty sure there was a reason we stopped doing this. There should be some discussion about that in my original patch. 
So it sounds like it was related to this:

> [fallthrough] ... but not for relative paths that would get resolved incorrectly at the lower layer (for example, in case of the RealFileSystem, because the strictly virtual path does not exist).

But if I remove that 2 of my new tests `ReturnsInternalPathVFSHit` and `ReturnsExternalPathVFSHit` do not pass. I think the behavior of them is what we want, what do you think?


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