llvm-project/clang/test/VFS/Inputs
Ben Barham 502f14d6f2 [VFS] Add a "redirecting-with" field to overlays
Extend "fallthrough" to allow a third option: "fallback". Fallthrough
allows the original path to used if the redirected (or mapped) path
fails. Fallback is the reverse of this, ie. use the original path and
fallback to the mapped path otherwise.

While this result *can* be achieved today using multiple overlays, this
adds a much more intuitive option. As an example, take two directories
"A" and "B". We would like files from "A" to be used, unless they don't
exist, in which case the VFS should fallback to those in "B".

With the current fallthrough option this is possible by adding two
overlays: one mapping from A -> B and another mapping from B -> A. Since
the frontend *nests* the two RedirectingFileSystems, the result will
be that "A" is mapped to "B" and back to "A", unless it isn't in "A" in
which case it fallsthrough to "B" (or fails if it exists in neither).

Using "fallback" semantics allows a single overlay instead: one mapping
from "A" to "B" but only using that mapping if the operation in "A"
fails first.

"redirect-only" is used to represent the current "fallthrough: false"
case.

Differential Revision: https://reviews.llvm.org/D117937
2022-02-03 13:10:23 -08:00
..
Bar.framework
Broken.framework
Foo.framework
MissingVFS
Nonmodular
Foo.h
Incomplete.h
IncompleteVFS.h
actual_header.h
actual_module.map
actual_module2.map
bar-headers.yaml
external-names.h
import_some_frame.h
include_real.h
incomplete-umbrella.modulemap
invalid-yaml.yaml
missing-key.yaml
public_header.h
public_header2.h
public_header3.h
redirect-and-fallthrough.yaml [VFS] Add a "redirecting-with" field to overlays 2022-02-03 13:10:23 -08:00
some_frame_module.map
unknown-key.yaml
unknown-redirect.yaml [VFS] Add a "redirecting-with" field to overlays 2022-02-03 13:10:23 -08:00
unknown-value.yaml
use-external-names.yaml
vfsoverlay-directory-relative.yaml
vfsoverlay-directory.yaml
vfsoverlay-root-relative.yaml [clang] support relative roots to vfs overlays 2022-01-19 10:13:06 -08:00
vfsoverlay.yaml
vfsoverlay2.yaml
vfsroot.yaml