summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2023-01-07 14:18:35 -0800
committerKazu Hirata <kazu@google.com>2023-01-07 14:18:35 -0800
commit2fe8327406050d2585d2ced910a678e28caefcf5 (patch)
treeda95c78fa33c17cf7829bbe6f5e0bfa62e0579ae /lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
parentf190ce625ab0dc5a5e2b2515e6d26debb34843ab (diff)
[lldb] Use std::optional instead of llvm::Optional (NFC)
This patch replaces (llvm::|)Optional< with std::optional<. I'll post a separate patch to clean up the "using" declarations, #include "llvm/ADT/Optional.h", etc. 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
Diffstat (limited to 'lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp')
-rw-r--r--lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp b/lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
index 7361cae3ac7f..93227c552414 100644
--- a/lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
@@ -413,7 +413,7 @@ DebuggerThread::HandleExitProcessEvent(const EXIT_PROCESS_DEBUG_INFO &info,
return DBG_CONTINUE;
}
-static llvm::Optional<std::string> GetFileNameFromHandleFallback(HANDLE hFile) {
+static std::optional<std::string> GetFileNameFromHandleFallback(HANDLE hFile) {
// Check that file is not empty as we cannot map a file with zero length.
DWORD dwFileSizeHi = 0;
DWORD dwFileSizeLo = ::GetFileSize(hFile, &dwFileSizeHi);
@@ -505,7 +505,7 @@ DebuggerThread::HandleLoadDllEvent(const LOAD_DLL_DEBUG_INFO &info,
path += 4;
on_load_dll(path);
- } else if (llvm::Optional<std::string> path =
+ } else if (std::optional<std::string> path =
GetFileNameFromHandleFallback(info.hFile)) {
on_load_dll(*path);
} else {