From a7938c74f16379704fbd38a3d82dfcb9345651ab Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 25 Jun 2022 21:42:52 -0700 Subject: [llvm] Don't use Optional::hasValue (NFC) This patch replaces Optional::hasValue with the implicit cast to bool in conditionals only. --- llvm/lib/Support/VirtualFileSystem.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/lib/Support/VirtualFileSystem.cpp') 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 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"; -- cgit v1.1