[PATCH] D117937: [VFS] Add a "redirecting-with" field to overlays

Ben Barham via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 24 20:37:41 PST 2022


bnbarham added a comment.

In D117937#3268114 <https://reviews.llvm.org/D117937#3268114>, @dexonsmith wrote:

> The scenario you describe reminds me of the testcase in https://reviews.llvm.org/D117730 ; can you explain if/how this patch relates to that one?

So a "fallback" is what we actually want, ie. there's a folder A that should be used first, falling back to B if the files don't exist. It just so happens that you can "hack" this by providing overlays that I mention in the commit (ie. A -> B and B -> A), but as you mentioned in the other PR it's an "extra layer of complexity" and I'm not sure it was really ever intended to work that way. It also really depends on how the frontend deals with multiple overlays, eg. it used to actually merge them (added them to an OverlayFileSystem instead of just nesting them). In that case you would need to provide A -> A and then A -> B.

Right now, the A -> B and B -> A overlays "hack" to achieve a fallback is broken due to the bug when using multiple overlays (as per the other PR). I think we should fix that bug regardless, but IMO adding a "fallback" makes more sense for what we actually need anyway.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117937



More information about the llvm-commits mailing list