forked from OSchip/llvm-project
502f14d6f2
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 |
||
---|---|---|
.. | ||
Inputs | ||
broken-vfs-module-dep.c | ||
directory.c | ||
external-names.c | ||
fallback.c | ||
framework-import.m | ||
implicit-include.c | ||
include-mixed-real-and-virtual.c | ||
include-real-from-virtual.c | ||
include-virtual-from-real.c | ||
include.c | ||
incomplete-umbrella.m | ||
module-header-mismatches.m | ||
module-import.m | ||
module_missing_vfs.m | ||
parse-errors.c | ||
real-path-found-first.m | ||
relative-path-errors.c | ||
relative-path.c | ||
subframework-symlink.m | ||
test_nonmodular.c | ||
umbrella-framework-import-skipnonexist.m | ||
vfsoverlay-relative-root.c | ||
vfsroot-include.c | ||
vfsroot-module.m | ||
vfsroot-with-overlay.c |