kwk created this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Fixing this error on windows build bot:

  
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(21):
 error C2440: 'initializing': cannot convert from 'nullptr' to 
'lldb::thread_result_t'
  
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(21):
 note: A native nullptr can only be converted to bool or, using 
reinterpret_cast, to an integral type
  
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(21):
 error C2439: 'lldb_private::HostNativeThreadBase::m_result': member could not 
be initialized
  
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\include\lldb/Host/HostNativeThreadBase.h(48):
 note: see declaration of 'lldb_private::HostNativeThreadBase::m_result'
  
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(24):
 error C2440: 'initializing': cannot convert from 'nullptr' to 
'lldb::thread_result_t'
  
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(24):
 note: A native nullptr can only be converted to bool or, using 
reinterpret_cast, to an integral type
  
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(24):
 error C2439: 'lldb_private::HostNativeThreadBase::m_result': member could not 
be initialized
  
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\include\lldb/Host/HostNativeThreadBase.h(48):
 note: see declaration of 'lldb_private::HostNativeThreadBase::m_result'
  
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(40):
 error C2440: '=': cannot convert from 'nullptr' to 'lldb::thread_result_t'
  
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(40):
 note: A native nullptr can only be converted to bool or, using 
reinterpret_cast, to an integral type
  
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(50):
 error C2440: '=': cannot convert from 'nullptr' to 'lldb::thread_result_t'
  
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(50):
 note: A native nullptr can only be converted to bool or, using 
reinterpret_cast, to an integral type

see 
http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/5050/steps/build/logs/stdio


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D62337

Files:
  lldb/source/Host/common/HostNativeThreadBase.cpp


Index: lldb/source/Host/common/HostNativeThreadBase.cpp
===================================================================
--- lldb/source/Host/common/HostNativeThreadBase.cpp
+++ lldb/source/Host/common/HostNativeThreadBase.cpp
@@ -18,10 +18,10 @@
 using namespace lldb_private;
 
 HostNativeThreadBase::HostNativeThreadBase()
-    : m_thread(LLDB_INVALID_HOST_THREAD), m_result(0) {}
+    : m_thread(LLDB_INVALID_HOST_THREAD), m_result({}) {}
 
 HostNativeThreadBase::HostNativeThreadBase(thread_t thread)
-    : m_thread(thread), m_result(0) {}
+    : m_thread(thread), m_result({}) {}
 
 lldb::thread_t HostNativeThreadBase::GetSystemHandle() const {
   return m_thread;
@@ -37,7 +37,7 @@
 
 void HostNativeThreadBase::Reset() {
   m_thread = LLDB_INVALID_HOST_THREAD;
-  m_result = 0;
+  m_result = {};
 }
 
 bool HostNativeThreadBase::EqualsThread(lldb::thread_t thread) const {
@@ -47,7 +47,7 @@
 lldb::thread_t HostNativeThreadBase::Release() {
   lldb::thread_t result = m_thread;
   m_thread = LLDB_INVALID_HOST_THREAD;
-  m_result = 0;
+  m_result = {};
 
   return result;
 }


Index: lldb/source/Host/common/HostNativeThreadBase.cpp
===================================================================
--- lldb/source/Host/common/HostNativeThreadBase.cpp
+++ lldb/source/Host/common/HostNativeThreadBase.cpp
@@ -18,10 +18,10 @@
 using namespace lldb_private;
 
 HostNativeThreadBase::HostNativeThreadBase()
-    : m_thread(LLDB_INVALID_HOST_THREAD), m_result(0) {}
+    : m_thread(LLDB_INVALID_HOST_THREAD), m_result({}) {}
 
 HostNativeThreadBase::HostNativeThreadBase(thread_t thread)
-    : m_thread(thread), m_result(0) {}
+    : m_thread(thread), m_result({}) {}
 
 lldb::thread_t HostNativeThreadBase::GetSystemHandle() const {
   return m_thread;
@@ -37,7 +37,7 @@
 
 void HostNativeThreadBase::Reset() {
   m_thread = LLDB_INVALID_HOST_THREAD;
-  m_result = 0;
+  m_result = {};
 }
 
 bool HostNativeThreadBase::EqualsThread(lldb::thread_t thread) const {
@@ -47,7 +47,7 @@
 lldb::thread_t HostNativeThreadBase::Release() {
   lldb::thread_t result = m_thread;
   m_thread = LLDB_INVALID_HOST_THREAD;
-  m_result = 0;
+  m_result = {};
 
   return result;
 }
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to