aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/VirtualFileSystem.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-06-25 11:56:50 -0700
committerKazu Hirata <kazu@google.com>2022-06-25 11:56:50 -0700
commit3b7c3a654c9175f41ac871a937cbcae73dfb3c5d (patch)
tree21094939ea6c8b726c481d7b28eaf4ea27c64008 /llvm/lib/Support/VirtualFileSystem.cpp
parentaa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d (diff)
downloadllvm-3b7c3a654c9175f41ac871a937cbcae73dfb3c5d.zip
llvm-3b7c3a654c9175f41ac871a937cbcae73dfb3c5d.tar.gz
llvm-3b7c3a654c9175f41ac871a937cbcae73dfb3c5d.tar.bz2
Revert "Don't use Optional::hasValue (NFC)"
This reverts commit aa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d.
Diffstat (limited to 'llvm/lib/Support/VirtualFileSystem.cpp')
-rw-r--r--llvm/lib/Support/VirtualFileSystem.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/Support/VirtualFileSystem.cpp b/llvm/lib/Support/VirtualFileSystem.cpp
index 9f6ad7e..9c6a0c0 100644
--- a/llvm/lib/Support/VirtualFileSystem.cpp
+++ b/llvm/lib/Support/VirtualFileSystem.cpp
@@ -2667,15 +2667,15 @@ void JSONWriter::write(ArrayRef<YAMLVFSEntry> Entries,
OS << "{\n"
" 'version': 0,\n";
- if (IsCaseSensitive)
- OS << " 'case-sensitive': '" << (*IsCaseSensitive ? "true" : "false")
- << "',\n";
- if (UseExternalNames)
- OS << " 'use-external-names': '" << (*UseExternalNames ? "true" : "false")
- << "',\n";
+ if (IsCaseSensitive.hasValue())
+ OS << " 'case-sensitive': '"
+ << (IsCaseSensitive.getValue() ? "true" : "false") << "',\n";
+ if (UseExternalNames.hasValue())
+ OS << " 'use-external-names': '"
+ << (UseExternalNames.getValue() ? "true" : "false") << "',\n";
bool UseOverlayRelative = false;
- if (IsOverlayRelative) {
- UseOverlayRelative = *IsOverlayRelative;
+ if (IsOverlayRelative.hasValue()) {
+ UseOverlayRelative = IsOverlayRelative.getValue();
OS << " 'overlay-relative': '" << (UseOverlayRelative ? "true" : "false")
<< "',\n";
}