Support: Add RedirectingFileSystem::create from simple list of redirections
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 12 Nov 2020 04:03:38 +0000 (23:03 -0500)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 9 Dec 2020 01:53:30 +0000 (17:53 -0800)
commit75cd8d756d6e88b075fae8fe631fdbb17802bdb8
treedf4bde4ec81beb710efb58420cc24f4111f649b7
parenta22eda548b8e1f9362018dec194af0ca91b35da0
Support: Add RedirectingFileSystem::create from simple list of redirections

Add an overload of `RedirectingFileSystem::create` that builds a
redirecting filesystem off of a simple vector of string pairs. This is
intended to be used to support `clang::arcmt::FileRemapper` and
`clang::PreprocessorOptions::RemappedFiles`.

Differential Revision: https://reviews.llvm.org/D91317
llvm/include/llvm/Support/VirtualFileSystem.h
llvm/lib/Support/VirtualFileSystem.cpp
llvm/unittests/Support/VirtualFileSystemTest.cpp