aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/VirtualFileSystem.cpp
diff options
context:
space:
mode:
authorJan Svoboda <jan_svoboda@apple.com>2024-04-12 10:09:04 -0700
committerJan Svoboda <jan_svoboda@apple.com>2024-04-12 10:32:58 -0700
commitedd7fed9da48c0e708cce9bd4d305ae43d8bd77c (patch)
tree5bfae6cf94943f2bf3584c36d2c10cceffd3cadc /llvm/lib/Support/VirtualFileSystem.cpp
parentfe59cb256289d9f2f6ebe75571389f3cc90bbdec (diff)
downloadllvm-edd7fed9da48c0e708cce9bd4d305ae43d8bd77c.zip
llvm-edd7fed9da48c0e708cce9bd4d305ae43d8bd77c.tar.gz
llvm-edd7fed9da48c0e708cce9bd4d305ae43d8bd77c.tar.bz2
[llvm][vfs] NFCI: Remove `const` from `VFS::getRealPath()`
This is an NFC change split from https://github.com/llvm/llvm-project/pull/68645.
Diffstat (limited to 'llvm/lib/Support/VirtualFileSystem.cpp')
-rw-r--r--llvm/lib/Support/VirtualFileSystem.cpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/llvm/lib/Support/VirtualFileSystem.cpp b/llvm/lib/Support/VirtualFileSystem.cpp
index 057f8eae..32b4800 100644
--- a/llvm/lib/Support/VirtualFileSystem.cpp
+++ b/llvm/lib/Support/VirtualFileSystem.cpp
@@ -138,7 +138,7 @@ std::error_code FileSystem::makeAbsolute(SmallVectorImpl<char> &Path) const {
}
std::error_code FileSystem::getRealPath(const Twine &Path,
- SmallVectorImpl<char> &Output) const {
+ SmallVectorImpl<char> &Output) {
return errc::operation_not_permitted;
}
@@ -275,7 +275,7 @@ public:
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) const override;
+ SmallVectorImpl<char> &Output) override;
protected:
void printImpl(raw_ostream &OS, PrintType Type,
@@ -357,9 +357,8 @@ std::error_code RealFileSystem::isLocal(const Twine &Path, bool &Result) {
return llvm::sys::fs::is_local(adjustPath(Path, Storage), Result);
}
-std::error_code
-RealFileSystem::getRealPath(const Twine &Path,
- SmallVectorImpl<char> &Output) const {
+std::error_code RealFileSystem::getRealPath(const Twine &Path,
+ SmallVectorImpl<char> &Output) {
SmallString<256> Storage;
return llvm::sys::fs::real_path(adjustPath(Path, Storage), Output);
}
@@ -471,9 +470,8 @@ 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) const {
+std::error_code OverlayFileSystem::getRealPath(const Twine &Path,
+ SmallVectorImpl<char> &Output) {
for (const auto &FS : FSList)
if (FS->exists(Path))
return FS->getRealPath(Path, Output);
@@ -1157,9 +1155,8 @@ std::error_code InMemoryFileSystem::setCurrentWorkingDirectory(const Twine &P) {
return {};
}
-std::error_code
-InMemoryFileSystem::getRealPath(const Twine &Path,
- SmallVectorImpl<char> &Output) const {
+std::error_code InMemoryFileSystem::getRealPath(const Twine &Path,
+ SmallVectorImpl<char> &Output) {
auto CWD = getCurrentWorkingDirectory();
if (!CWD || CWD->empty())
return errc::operation_not_permitted;
@@ -2535,7 +2532,7 @@ RedirectingFileSystem::openFileForRead(const Twine &OriginalPath) {
std::error_code
RedirectingFileSystem::getRealPath(const Twine &OriginalPath,
- SmallVectorImpl<char> &Output) const {
+ SmallVectorImpl<char> &Output) {
SmallString<256> Path;
OriginalPath.toVector(Path);