From 0af53df8838fd0a48d8649522ac3fddef065358d Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 25 Nov 2022 21:53:00 -0800 Subject: [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 --- llvm/lib/Support/VirtualFileSystem.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Support/VirtualFileSystem.cpp') diff --git a/llvm/lib/Support/VirtualFileSystem.cpp b/llvm/lib/Support/VirtualFileSystem.cpp index 14742f727411..3c4ce947b872 100644 --- a/llvm/lib/Support/VirtualFileSystem.cpp +++ b/llvm/lib/Support/VirtualFileSystem.cpp @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -298,7 +299,7 @@ private: // The current working directory, with links resolved. (readlink .). SmallString<128> Resolved; }; - Optional WD; + std::optional WD; }; } // namespace @@ -1604,7 +1605,7 @@ class llvm::vfs::RedirectingFileSystemParser { return false; } - Optional + std::optional parseRedirectKind(yaml::Node *N) { SmallString<12> Storage; StringRef Value; -- cgit v1.2.3