From 2fe8327406050d2585d2ced910a678e28caefcf5 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 7 Jan 2023 14:18:35 -0800 Subject: [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 --- .../Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp') 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>> async_result = + std::future>> 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>> async_result = + std::future>> 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>> async_result = + std::future>> 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> result = std::async( - std::launch::async, [&] { return client.GetQOffsets(); }); + std::future> 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> expected_tag_data) { + std::optional> expected_tag_data) { const auto &ReadMemoryTags = [&]() { std::future result = std::async(std::launch::async, [&] { return client.ReadMemoryTags(0xDEF0, read_len, type); -- cgit v1.1