aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
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/GDBRemoteCommunicationClient.h
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/GDBRemoteCommunicationClient.h')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
index c48852b..d3b03446 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
@@ -236,9 +236,9 @@ public:
llvm::VersionTuple GetMacCatalystVersion();
- llvm::Optional<std::string> GetOSBuildString();
+ std::optional<std::string> GetOSBuildString();
- llvm::Optional<std::string> GetOSKernelDescription();
+ std::optional<std::string> GetOSKernelDescription();
ArchSpec GetSystemArchitecture();
@@ -300,8 +300,8 @@ public:
// and response times.
bool SendSpeedTestPacket(uint32_t send_size, uint32_t recv_size);
- llvm::Optional<PidTid>
- SendSetCurrentThreadPacket(uint64_t tid, uint64_t pid, char op);
+ std::optional<PidTid> SendSetCurrentThreadPacket(uint64_t tid, uint64_t pid,
+ char op);
bool SetCurrentThread(uint64_t tid,
lldb::pid_t pid = LLDB_INVALID_PROCESS_ID);
@@ -352,11 +352,11 @@ public:
bool CloseFile(lldb::user_id_t fd, Status &error);
- llvm::Optional<GDBRemoteFStatData> FStat(lldb::user_id_t fd);
+ std::optional<GDBRemoteFStatData> FStat(lldb::user_id_t fd);
// NB: this is just a convenience wrapper over open() + fstat(). It does not
// work if the file cannot be opened.
- llvm::Optional<GDBRemoteFStatData> Stat(const FileSpec &file_spec);
+ std::optional<GDBRemoteFStatData> Stat(const FileSpec &file_spec);
lldb::user_id_t GetFileSize(const FileSpec &file_spec);
@@ -445,12 +445,12 @@ public:
/// Use qOffsets to query the offset used when relocating the target
/// executable. If successful, the returned structure will contain at least
/// one value in the offsets field.
- llvm::Optional<QOffsets> GetQOffsets();
+ std::optional<QOffsets> GetQOffsets();
bool GetModuleInfo(const FileSpec &module_file_spec,
const ArchSpec &arch_spec, ModuleSpec &module_spec);
- llvm::Optional<std::vector<ModuleSpec>>
+ std::optional<std::vector<ModuleSpec>>
GetModulesInfo(llvm::ArrayRef<FileSpec> module_file_specs,
const llvm::Triple &triple);