aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.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/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
parentf190ce625ab0dc5a5e2b2515e6d26debb34843ab (diff)
downloadllvm-2fe8327406050d2585d2ced910a678e28caefcf5.zip
llvm-2fe8327406050d2585d2ced910a678e28caefcf5.tar.gz
llvm-2fe8327406050d2585d2ced910a678e28caefcf5.tar.bz2
[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/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
index 03a2e73..30d6d78 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
@@ -639,7 +639,7 @@ static void WriteRegisterValueInHexFixedWidth(
}
}
-static llvm::Optional<json::Object>
+static std::optional<json::Object>
GetRegistersAsJSON(NativeThreadProtocol &thread) {
Log *log = GetLog(LLDBLog::Thread);
@@ -753,7 +753,7 @@ GetJSONThreadsInfo(NativeProcessProtocol &process, bool abridged) {
json::Object thread_obj;
if (!abridged) {
- if (llvm::Optional<json::Object> registers = GetRegistersAsJSON(thread))
+ if (std::optional<json::Object> registers = GetRegistersAsJSON(thread))
thread_obj.try_emplace("registers", std::move(*registers));
}
@@ -4279,7 +4279,7 @@ std::string
lldb_private::process_gdb_remote::LLGSArgToURL(llvm::StringRef url_arg,
bool reverse_connect) {
// Try parsing the argument as URL.
- if (llvm::Optional<URI> url = URI::Parse(url_arg)) {
+ if (std::optional<URI> url = URI::Parse(url_arg)) {
if (reverse_connect)
return url_arg.str();