aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/VirtualFileSystem.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-06-18 23:07:11 -0700
committerKazu Hirata <kazu@google.com>2022-06-18 23:07:11 -0700
commit129b531c9c67fc50ef9dcb7d28d7081546213ac1 (patch)
treea8b4769c0d461caddac853ce26db0058acc710df /llvm/lib/Support/VirtualFileSystem.cpp
parent1e556f459b44dd0ca4073e932f66ecb6f40fe31a (diff)
downloadllvm-129b531c9c67fc50ef9dcb7d28d7081546213ac1.zip
llvm-129b531c9c67fc50ef9dcb7d28d7081546213ac1.tar.gz
llvm-129b531c9c67fc50ef9dcb7d28d7081546213ac1.tar.bz2
[llvm] Use value_or instead of getValueOr (NFC)
Diffstat (limited to 'llvm/lib/Support/VirtualFileSystem.cpp')
-rw-r--r--llvm/lib/Support/VirtualFileSystem.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Support/VirtualFileSystem.cpp b/llvm/lib/Support/VirtualFileSystem.cpp
index c9273f0..d94554b 100644
--- a/llvm/lib/Support/VirtualFileSystem.cpp
+++ b/llvm/lib/Support/VirtualFileSystem.cpp
@@ -806,10 +806,10 @@ bool InMemoryFileSystem::addFile(const Twine &P, time_t ModificationTime,
detail::InMemoryDirectory *Dir = Root.get();
auto I = llvm::sys::path::begin(Path), E = sys::path::end(Path);
- const auto ResolvedUser = User.getValueOr(0);
- const auto ResolvedGroup = Group.getValueOr(0);
- const auto ResolvedType = Type.getValueOr(sys::fs::file_type::regular_file);
- const auto ResolvedPerms = Perms.getValueOr(sys::fs::all_all);
+ const auto ResolvedUser = User.value_or(0);
+ const auto ResolvedGroup = Group.value_or(0);
+ const auto ResolvedType = Type.value_or(sys::fs::file_type::regular_file);
+ const auto ResolvedPerms = Perms.value_or(sys::fs::all_all);
// Any intermediate directories we create should be accessible by
// the owner, even if Perms says otherwise for the final path.
const auto NewDirectoryPerms = ResolvedPerms | sys::fs::owner_all;