Skip to content

Commit 342571e

Browse files
committedMay 23, 2019
[lldb] followup fix for https://reviews.llvm.org/D62305
Summary: 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 Reviewers: stella.stamenova, JDevlieghere Reviewed By: JDevlieghere Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D62337 llvm-svn: 361565
1 parent e0ef04f commit 342571e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎lldb/source/Host/common/HostNativeThreadBase.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ using namespace lldb;
1818
using namespace lldb_private;
1919

2020
HostNativeThreadBase::HostNativeThreadBase()
21-
: m_thread(LLDB_INVALID_HOST_THREAD), m_result(0) {}
21+
: m_thread(LLDB_INVALID_HOST_THREAD), m_result({}) {}
2222

2323
HostNativeThreadBase::HostNativeThreadBase(thread_t thread)
24-
: m_thread(thread), m_result(0) {}
24+
: m_thread(thread), m_result({}) {}
2525

2626
lldb::thread_t HostNativeThreadBase::GetSystemHandle() const {
2727
return m_thread;
@@ -37,7 +37,7 @@ bool HostNativeThreadBase::IsJoinable() const {
3737

3838
void HostNativeThreadBase::Reset() {
3939
m_thread = LLDB_INVALID_HOST_THREAD;
40-
m_result = 0;
40+
m_result = {};
4141
}
4242

4343
bool HostNativeThreadBase::EqualsThread(lldb::thread_t thread) const {
@@ -47,7 +47,7 @@ bool HostNativeThreadBase::EqualsThread(lldb::thread_t thread) const {
4747
lldb::thread_t HostNativeThreadBase::Release() {
4848
lldb::thread_t result = m_thread;
4949
m_thread = LLDB_INVALID_HOST_THREAD;
50-
m_result = 0;
50+
m_result = {};
5151

5252
return result;
5353
}

0 commit comments

Comments
 (0)