This is an archive of the discontinued LLVM Phabricator instance.

Added a RealFileSystem implementation that does not rely on global CWD.
AbandonedPublic

Authored by ilya-biryukov on Aug 2 2017, 9:29 AM.

Details

Summary

Allows to have multiple instances of RealFileSystem that have
different working directories.

Event Timeline

ilya-biryukov created this revision.Aug 2 2017, 9:29 AM

Also tested by temporarily replacing getRealFileSystem() body with return createThreadFriendlyRealFS(); and running check-all, all tests passed.
To be more specific, there was one crash in clang-format, as there is a piece of code that uses raw pointer from getRealFileSystem instead of ref-counted (i.e. it calls getRealFileSystem().get()). After working around that, all tests passed.

ilya-biryukov planned changes to this revision.Aug 3 2017, 1:36 AM

After a chat with @klimek, working on an implementation that would use openAt().

ilya-biryukov updated this revision to Diff 109524.EditedAug 3 2017, 4:53 AM

Added a very rough prototype of vfs::RealFileSystem that uses openat and similar functions.
Not ready for submission yet, submitted here to start discussion about Windows implementation.

Requires changes in Support library to run correctly: https://reviews.llvm.org/D36265

ilya-biryukov abandoned this revision.EditedMay 23 2019, 2:00 AM
ilya-biryukov added a subscriber: sammccall.

abandoning in favor of the change landed by @sammccall that resolves uses absolute paths instead of at-family functions.