diff options
author | Sam McCall <sam.mccall@gmail.com> | 2018-11-09 15:11:34 +0000 |
---|---|---|
committer | Sam McCall <sam.mccall@gmail.com> | 2018-11-09 15:11:34 +0000 |
commit | 99538e89a9dffce36ee4f73728039cb741df5f08 (patch) | |
tree | 5f67d4505a2092168cb4682d273f0e0459878b55 /llvm/lib/Support/VirtualFileSystem.cpp | |
parent | 2804f32ec4609c98d4cfa56065c7bc2dd3dabcb3 (diff) | |
download | bcm5719-llvm-99538e89a9dffce36ee4f73728039cb741df5f08.tar.gz bcm5719-llvm-99538e89a9dffce36ee4f73728039cb741df5f08.zip |
Revert "[VFS] Add "expand tilde" argument to getRealPath."
This reverts commit r346453.
This is a complex change to a widely-used interface, and was not reviewed.
llvm-svn: 346500
Diffstat (limited to 'llvm/lib/Support/VirtualFileSystem.cpp')
-rw-r--r-- | llvm/lib/Support/VirtualFileSystem.cpp | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/llvm/lib/Support/VirtualFileSystem.cpp b/llvm/lib/Support/VirtualFileSystem.cpp index eeac88383aa..e8b0435b9cd 100644 --- a/llvm/lib/Support/VirtualFileSystem.cpp +++ b/llvm/lib/Support/VirtualFileSystem.cpp @@ -132,8 +132,7 @@ std::error_code FileSystem::makeAbsolute(SmallVectorImpl<char> &Path) const { } std::error_code FileSystem::getRealPath(const Twine &Path, - SmallVectorImpl<char> &Output, - bool ExpandTilde) const { + SmallVectorImpl<char> &Output) const { return errc::operation_not_permitted; } @@ -239,8 +238,8 @@ public: llvm::ErrorOr<std::string> getCurrentWorkingDirectory() const override; std::error_code setCurrentWorkingDirectory(const Twine &Path) override; std::error_code isLocal(const Twine &Path, bool &Result) override; - std::error_code getRealPath(const Twine &Path, SmallVectorImpl<char> &Output, - bool ExpandTilde = false) const override; + std::error_code getRealPath(const Twine &Path, + SmallVectorImpl<char> &Output) const override; private: mutable std::mutex CWDMutex; @@ -298,9 +297,9 @@ std::error_code RealFileSystem::isLocal(const Twine &Path, bool &Result) { return llvm::sys::fs::is_local(Path, Result); } -std::error_code RealFileSystem::getRealPath(const Twine &Path, - SmallVectorImpl<char> &Output, - bool ExpandTilde) const { +std::error_code +RealFileSystem::getRealPath(const Twine &Path, + SmallVectorImpl<char> &Output) const { return llvm::sys::fs::real_path(Path, Output); } @@ -394,12 +393,12 @@ std::error_code OverlayFileSystem::isLocal(const Twine &Path, bool &Result) { return errc::no_such_file_or_directory; } -std::error_code OverlayFileSystem::getRealPath(const Twine &Path, - SmallVectorImpl<char> &Output, - bool ExpandTilde) const { +std::error_code +OverlayFileSystem::getRealPath(const Twine &Path, + SmallVectorImpl<char> &Output) const { for (auto &FS : FSList) if (FS->exists(Path)) - return FS->getRealPath(Path, Output, ExpandTilde); + return FS->getRealPath(Path, Output); return errc::no_such_file_or_directory; } @@ -917,9 +916,9 @@ std::error_code InMemoryFileSystem::setCurrentWorkingDirectory(const Twine &P) { return {}; } -std::error_code InMemoryFileSystem::getRealPath(const Twine &Path, - SmallVectorImpl<char> &Output, - bool ExpandTilde) const { +std::error_code +InMemoryFileSystem::getRealPath(const Twine &Path, + SmallVectorImpl<char> &Output) const { auto CWD = getCurrentWorkingDirectory(); if (!CWD || CWD->empty()) return errc::operation_not_permitted; |