aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/VirtualFileSystem.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-11-25 21:53:00 -0800
committerKazu Hirata <kazu@google.com>2022-11-25 21:53:00 -0800
commit0af53df8838fd0a48d8649522ac3fddef065358d (patch)
tree8376598212750110e5d2d12bcbc078f57b9c1e38 /llvm/lib/Support/VirtualFileSystem.cpp
parent7c421b53d129e120035ab73a4e743f6397066a27 (diff)
downloadllvm-0af53df8838fd0a48d8649522ac3fddef065358d.zip
llvm-0af53df8838fd0a48d8649522ac3fddef065358d.tar.gz
llvm-0af53df8838fd0a48d8649522ac3fddef065358d.tar.bz2
[Support] Use std::optional in VirtualFileSystem.cpp (NFC)
This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
Diffstat (limited to 'llvm/lib/Support/VirtualFileSystem.cpp')
-rw-r--r--llvm/lib/Support/VirtualFileSystem.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Support/VirtualFileSystem.cpp b/llvm/lib/Support/VirtualFileSystem.cpp
index 14742f7..3c4ce94 100644
--- a/llvm/lib/Support/VirtualFileSystem.cpp
+++ b/llvm/lib/Support/VirtualFileSystem.cpp
@@ -46,6 +46,7 @@
#include <iterator>
#include <limits>
#include <memory>
+#include <optional>
#include <string>
#include <system_error>
#include <utility>
@@ -298,7 +299,7 @@ private:
// The current working directory, with links resolved. (readlink .).
SmallString<128> Resolved;
};
- Optional<WorkingDirectory> WD;
+ std::optional<WorkingDirectory> WD;
};
} // namespace
@@ -1604,7 +1605,7 @@ class llvm::vfs::RedirectingFileSystemParser {
return false;
}
- Optional<RedirectingFileSystem::RedirectKind>
+ std::optional<RedirectingFileSystem::RedirectKind>
parseRedirectKind(yaml::Node *N) {
SmallString<12> Storage;
StringRef Value;