This is an archive of the discontinued LLVM Phabricator instance.

reland: [VFS] Use original path when falling back to external FS
ClosedPublic

Authored by keith on Nov 13 2021, 11:19 AM.

Details

Summary

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;
          ^

Diff Detail

Event Timeline

keith created this revision.Nov 13 2021, 11:19 AM
keith requested review of this revision.Nov 13 2021, 11:19 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptNov 13 2021, 11:19 AM
This revision was not accepted when it landed; it landed in state Needs Review.Nov 13 2021, 12:21 PM
This revision was automatically updated to reflect the committed changes.

@keith This patch causes some issues when nesting/chaining RedirectingFileSystems. I have a few tests in https://reviews.llvm.org/D117730 for more details.

Feedback on that PR would be appreciated, I'm not sure if it's the direction we want to go or not.