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) {


_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to