[Lldb-commits] [lldb] r361528 - [HostNativeThreadBase] Undo nullptr changes

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Thu May 23 11:15:44 PDT 2019


Author: jdevlieghere
Date: Thu May 23 11:15:43 2019
New Revision: 361528

URL: http://llvm.org/viewvc/llvm-project?rev=361528&view=rev
Log:
[HostNativeThreadBase] Undo nullptr changes

The thread result type is an unsigned instead of a pointer on windows,
so we shouldn't replace 0 with nullptr here.

Modified:
    lldb/trunk/source/Host/common/HostNativeThreadBase.cpp

Modified: lldb/trunk/source/Host/common/HostNativeThreadBase.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/HostNativeThreadBase.cpp?rev=361528&r1=361527&r2=361528&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/HostNativeThreadBase.cpp (original)
+++ lldb/trunk/source/Host/common/HostNativeThreadBase.cpp Thu May 23 11:15:43 2019
@@ -18,10 +18,10 @@ using namespace lldb;
 using namespace lldb_private;
 
 HostNativeThreadBase::HostNativeThreadBase()
-    : m_thread(LLDB_INVALID_HOST_THREAD), m_result(nullptr) {}
+    : m_thread(LLDB_INVALID_HOST_THREAD), m_result(0) {}
 
 HostNativeThreadBase::HostNativeThreadBase(thread_t thread)
-    : m_thread(thread), m_result(nullptr) {}
+    : m_thread(thread), m_result(0) {}
 
 lldb::thread_t HostNativeThreadBase::GetSystemHandle() const {
   return m_thread;
@@ -37,7 +37,7 @@ bool HostNativeThreadBase::IsJoinable()
 
 void HostNativeThreadBase::Reset() {
   m_thread = LLDB_INVALID_HOST_THREAD;
-  m_result = nullptr;
+  m_result = 0;
 }
 
 bool HostNativeThreadBase::EqualsThread(lldb::thread_t thread) const {
@@ -47,7 +47,7 @@ bool HostNativeThreadBase::EqualsThread(
 lldb::thread_t HostNativeThreadBase::Release() {
   lldb::thread_t result = m_thread;
   m_thread = LLDB_INVALID_HOST_THREAD;
-  m_result = nullptr;
+  m_result = 0;
 
   return result;
 }




More information about the lldb-commits mailing list