[Lldb-commits] [lldb] r287921 - Fix FreeBSD build error in r287920

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Fri Nov 25 04:15:18 PST 2016


Author: labath
Date: Fri Nov 25 06:15:17 2016
New Revision: 287921

URL: http://llvm.org/viewvc/llvm-project?rev=287921&view=rev
Log:
Fix FreeBSD build error in r287920

The conditional expression is ambiguous there, so help it by explicitly casting.
This will go away once we use chrono all the way down.

Modified:
    lldb/trunk/source/Core/Communication.cpp

Modified: lldb/trunk/source/Core/Communication.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Communication.cpp?rev=287921&r1=287920&r2=287921&view=diff
==============================================================================
--- lldb/trunk/source/Core/Communication.cpp (original)
+++ lldb/trunk/source/Core/Communication.cpp Fri Nov 25 06:15:17 2016
@@ -115,6 +115,8 @@ bool Communication::HasConnection() cons
 size_t Communication::Read(void *dst, size_t dst_len,
                            const Timeout<std::micro> &timeout,
                            ConnectionStatus &status, Error *error_ptr) {
+  using std::chrono::microseconds;
+
   lldb_private::LogIfAnyCategoriesSet(
       LIBLLDB_LOG_COMMUNICATION,
       "%p Communication::Read (dst = %p, dst_len = %" PRIu64
@@ -141,8 +143,8 @@ size_t Communication::Read(void *dst, si
     listener_sp->StartListeningForEvents(
         this, eBroadcastBitReadThreadGotBytes | eBroadcastBitReadThreadDidExit);
     EventSP event_sp;
-    std::chrono::microseconds listener_timeout =
-        timeout ? *timeout : std::chrono::microseconds(0);
+    microseconds listener_timeout =
+        timeout ? microseconds(*timeout) : microseconds(0);
     while (listener_sp->WaitForEvent(listener_timeout, event_sp)) {
       const uint32_t event_type = event_sp->GetType();
       if (event_type & eBroadcastBitReadThreadGotBytes) {




More information about the lldb-commits mailing list