reland: [VFS] Use original path when falling back to external FS
authorKeith Smiley <keithbsmiley@gmail.com>
Sat, 13 Nov 2021 18:13:38 +0000 (10:13 -0800)
committerKeith Smiley <keithbsmiley@gmail.com>
Sat, 13 Nov 2021 20:14:34 +0000 (12:14 -0800)
commit86e2af8043c7728710a711b623f27425801a36c3
treebd3f0fb835c32161866f128e93d1fb550ffec7e5
parente96214ddefb98d18c4448604a746657dba1da91f
reland: [VFS] Use original path when falling back to external FS

This reverts commit f0cf544d6f6fe6cbca4c07772998272d6bb433d8.

Just a small change to fix:

```
/home/buildbot/as-builder-4/llvm-clang-x86_64-expensive-checks-ubuntu/llvm-project/llvm/lib/Support/VirtualFileSystem.cpp: In static member function ‘static llvm::ErrorOr<std::unique_ptr<llvm::vfs::File> > llvm::vfs::File::getWithPath(llvm::ErrorOr<std::unique_ptr<llvm::vfs::File> >, const llvm::Twine&)’:
/home/buildbot/as-builder-4/llvm-clang-x86_64-expensive-checks-ubuntu/llvm-project/llvm/lib/Support/VirtualFileSystem.cpp:2084:10: error: could not convert ‘F’ from ‘std::unique_ptr<llvm::vfs::File>’ to ‘llvm::ErrorOr<std::unique_ptr<llvm::vfs::File> >’
   return F;
          ^
```

Differential Revision: https://reviews.llvm.org/D113832
clang/test/VFS/relative-path-errors.c [new file with mode: 0644]
llvm/include/llvm/Support/VirtualFileSystem.h
llvm/lib/Support/VirtualFileSystem.cpp
llvm/unittests/Support/VirtualFileSystemTest.cpp