Fix some compilation failures introduced in recent patches.
This fixes two compilation failures:
1) Designated initializers are C++20. We can't use them in LLVM.
2) thread_result_t is not a pointer type on all platforms, so
returning nullptr is an error.
llvm-svn: 346873
diff --git a/lldb/source/Plugins/Language/ObjC/Cocoa.cpp b/lldb/source/Plugins/Language/ObjC/Cocoa.cpp
index 16f77e8..4aa3e0b 100644
--- a/lldb/source/Plugins/Language/ObjC/Cocoa.cpp
+++ b/lldb/source/Plugins/Language/ObjC/Cocoa.cpp
@@ -783,7 +783,8 @@
if (encodedTimeInterval == std::numeric_limits<uint64_t>::max())
return (uint64_t)-0.0;
- TaggedDoubleBits encodedBits = { .i = encodedTimeInterval };
+ TaggedDoubleBits encodedBits = {};
+ encodedBits.i = encodedTimeInterval;
DoubleBits decodedBits;
// Sign and fraction are represented exactly.
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationReplayServer.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationReplayServer.cpp
index c272f93..a0ebf42 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationReplayServer.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationReplayServer.cpp
@@ -190,15 +190,15 @@
case eBroadcastBitAsyncContinue:
ReceivePacket(*server, done);
if (done)
- return nullptr;
+ return {};
break;
case eBroadcastBitAsyncThreadShouldExit:
default:
- return nullptr;
+ return {};
}
}
}
}
- return nullptr;
+ return {};
}