[Lldb-commits] [PATCH] D62305: [lldb] fix cannot convert from 'nullptr' to 'lldb::thread_result_t'

Konrad Wilhelm Kleine via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu May 23 07:25:09 PDT 2019


kwk updated this revision to Diff 200969.
kwk added a comment.

- Return empty lldb::thread_result_t as {}


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62305/new/

https://reviews.llvm.org/D62305

Files:
  lldb/source/Core/Communication.cpp
  lldb/source/Core/Debugger.cpp
  lldb/source/Host/common/TaskPool.cpp
  lldb/source/Host/windows/HostProcessWindows.cpp
  lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp


Index: lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
===================================================================
--- lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
+++ lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
@@ -132,7 +132,7 @@
   else
     m_debug_delegate->OnDebuggerError(error, 0);
 
-  return 0;
+  return {};
 }
 
 lldb::thread_result_t DebuggerThread::DebuggerThreadAttachRoutine(
@@ -148,7 +148,7 @@
   if (!DebugActiveProcess((DWORD)pid)) {
     Status error(::GetLastError(), eErrorTypeWin32);
     m_debug_delegate->OnDebuggerError(error, 0);
-    return 0;
+    return {};
   }
 
   // The attach was successful, enter the debug loop.  From here on out, this
@@ -156,7 +156,7 @@
   // in DebugLaunch should apply from this point out.
   DebugLoop();
 
-  return 0;
+  return {};
 }
 
 Status DebuggerThread::StopDebugging(bool terminate) {
Index: lldb/source/Host/windows/HostProcessWindows.cpp
===================================================================
--- lldb/source/Host/windows/HostProcessWindows.cpp
+++ lldb/source/Host/windows/HostProcessWindows.cpp
@@ -109,7 +109,7 @@
     ::CloseHandle(info->process_handle);
     delete (info);
   }
-  return 0;
+  return {};
 }
 
 void HostProcessWindows::Close() {
Index: lldb/source/Host/common/TaskPool.cpp
===================================================================
--- lldb/source/Host/common/TaskPool.cpp
+++ lldb/source/Host/common/TaskPool.cpp
@@ -73,7 +73,7 @@
 
 lldb::thread_result_t TaskPoolImpl::WorkerPtr(void *pool) {
   Worker((TaskPoolImpl *)pool);
-  return nullptr;
+  return {};
 }
 
 void TaskPoolImpl::Worker(TaskPoolImpl *pool) {
Index: lldb/source/Core/Debugger.cpp
===================================================================
--- lldb/source/Core/Debugger.cpp
+++ lldb/source/Core/Debugger.cpp
@@ -1616,7 +1616,7 @@
 
 lldb::thread_result_t Debugger::EventHandlerThread(lldb::thread_arg_t arg) {
   ((Debugger *)arg)->DefaultEventHandler();
-  return nullptr;
+  return {};
 }
 
 bool Debugger::StartEventHandlerThread() {
@@ -1661,7 +1661,7 @@
   Debugger *debugger = (Debugger *)arg;
   debugger->ExecuteIOHandlers();
   debugger->StopEventHandlerThread();
-  return nullptr;
+  return {};
 }
 
 bool Debugger::HasIOHandlerThread() { return m_io_handler_thread.IsJoinable(); }
Index: lldb/source/Core/Communication.cpp
===================================================================
--- lldb/source/Core/Communication.cpp
+++ lldb/source/Core/Communication.cpp
@@ -359,7 +359,7 @@
   // Let clients know that this thread is exiting
   comm->BroadcastEvent(eBroadcastBitNoMorePendingInput);
   comm->BroadcastEvent(eBroadcastBitReadThreadDidExit);
-  return nullptr;
+  return {};
 }
 
 void Communication::SetReadThreadBytesReceivedCallback(


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62305.200969.patch
Type: text/x-patch
Size: 2817 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190523/e8c0b75c/attachment-0001.bin>


More information about the lldb-commits mailing list