aboutsummaryrefslogtreecommitdiff
path: root/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.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/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.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/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp')
-rw-r--r--lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp b/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
index a279038..f3eea28 100644
--- a/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
+++ b/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
@@ -179,7 +179,7 @@ TEST_F(GDBRemoteCommunicationClientTest, GetModulesInfo) {
// the FileSpecs they create.
FileSpec("/foo/baw.so", FileSpec::Style::windows),
};
- std::future<llvm::Optional<std::vector<ModuleSpec>>> async_result =
+ std::future<std::optional<std::vector<ModuleSpec>>> async_result =
std::async(std::launch::async,
[&] { return client.GetModulesInfo(file_specs, triple); });
HandlePacket(
@@ -204,7 +204,7 @@ TEST_F(GDBRemoteCommunicationClientTest, GetModulesInfo_UUID20) {
llvm::Triple triple("i386-pc-linux");
FileSpec file_spec("/foo/bar.so", FileSpec::Style::posix);
- std::future<llvm::Optional<std::vector<ModuleSpec>>> async_result =
+ std::future<std::optional<std::vector<ModuleSpec>>> async_result =
std::async(std::launch::async,
[&] { return client.GetModulesInfo(file_spec, triple); });
HandlePacket(
@@ -250,7 +250,7 @@ TEST_F(GDBRemoteCommunicationClientTest, GetModulesInfoInvalidResponse) {
};
for (const char *response : invalid_responses) {
- std::future<llvm::Optional<std::vector<ModuleSpec>>> async_result =
+ std::future<std::optional<std::vector<ModuleSpec>>> async_result =
std::async(std::launch::async,
[&] { return client.GetModulesInfo(file_spec, triple); });
HandlePacket(
@@ -443,8 +443,8 @@ TEST_F(GDBRemoteCommunicationClientTest, SendTraceSupportedPacket) {
TEST_F(GDBRemoteCommunicationClientTest, GetQOffsets) {
const auto &GetQOffsets = [&](llvm::StringRef response) {
- std::future<Optional<QOffsets>> result = std::async(
- std::launch::async, [&] { return client.GetQOffsets(); });
+ std::future<std::optional<QOffsets>> result =
+ std::async(std::launch::async, [&] { return client.GetQOffsets(); });
HandlePacket(server, "qOffsets", response);
return result.get();
@@ -470,7 +470,7 @@ TEST_F(GDBRemoteCommunicationClientTest, GetQOffsets) {
static void
check_qmemtags(TestClient &client, MockServer &server, size_t read_len,
int32_t type, const char *packet, llvm::StringRef response,
- llvm::Optional<std::vector<uint8_t>> expected_tag_data) {
+ std::optional<std::vector<uint8_t>> expected_tag_data) {
const auto &ReadMemoryTags = [&]() {
std::future<DataBufferSP> result = std::async(std::launch::async, [&] {
return client.ReadMemoryTags(0xDEF0, read_len, type);