aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/VirtualFileSystem.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-06-25 21:42:52 -0700
committerKazu Hirata <kazu@google.com>2022-06-25 21:42:52 -0700
commita7938c74f16379704fbd38a3d82dfcb9345651ab (patch)
treec60b0dce73b749e64ab20d51ef00abfbc547857f /llvm/lib/Support/VirtualFileSystem.cpp
parent77295c5486e48a4319efcfc4ac262304c7e7025c (diff)
downloadllvm-a7938c74f16379704fbd38a3d82dfcb9345651ab.zip
llvm-a7938c74f16379704fbd38a3d82dfcb9345651ab.tar.gz
llvm-a7938c74f16379704fbd38a3d82dfcb9345651ab.tar.bz2
[llvm] Don't use Optional::hasValue (NFC)
This patch replaces Optional::hasValue with the implicit cast to bool in conditionals only.
Diffstat (limited to 'llvm/lib/Support/VirtualFileSystem.cpp')
-rw-r--r--llvm/lib/Support/VirtualFileSystem.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Support/VirtualFileSystem.cpp b/llvm/lib/Support/VirtualFileSystem.cpp
index 9c6a0c0..21f0c39 100644
--- a/llvm/lib/Support/VirtualFileSystem.cpp
+++ b/llvm/lib/Support/VirtualFileSystem.cpp
@@ -2667,14 +2667,14 @@ void JSONWriter::write(ArrayRef<YAMLVFSEntry> Entries,
OS << "{\n"
" 'version': 0,\n";
- if (IsCaseSensitive.hasValue())
+ if (IsCaseSensitive)
OS << " 'case-sensitive': '"
<< (IsCaseSensitive.getValue() ? "true" : "false") << "',\n";
- if (UseExternalNames.hasValue())
+ if (UseExternalNames)
OS << " 'use-external-names': '"
<< (UseExternalNames.getValue() ? "true" : "false") << "',\n";
bool UseOverlayRelative = false;
- if (IsOverlayRelative.hasValue()) {
+ if (IsOverlayRelative) {
UseOverlayRelative = IsOverlayRelative.getValue();
OS << " 'overlay-relative': '" << (UseOverlayRelative ? "true" : "false")
<< "',\n";