llvm-project/lldb/source/Plugins/Process/Windows/Common
Konrad Kleine 85200645c6 [lldb] fix cannot convert from 'nullptr' to 'lldb::thread_result_t'
Summary:
On Windows `lldb::thread_result_t` resolves to `typedef unsigned thread_result_t;` and on other platforms it resolves to `typedef void *thread_result_t;`.
 Therefore one cannot use `nullptr` when returning from a function that returns `thread_result_t`.

I've made this change because a windows build bot fails with these errors:

```
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Core\Communication.cpp(362): error C2440: 'return': cannot convert from 'nullptr' to 'lldb::thread_result_t'
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Core\Communication.cpp(362): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type
```

and

```
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Core\Debugger.cpp(1619): error C2440: 'return': cannot convert from 'nullptr' to 'lldb::thread_result_t'
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Core\Debugger.cpp(1619): 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\Core\Debugger.cpp(1664): error C2440: 'return': cannot convert from 'nullptr' to 'lldb::thread_result_t'
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Core\Debugger.cpp(1664): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type
```

This is the failing build: http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/5035/steps/build/logs/stdio

Reviewers: JDevlieghere, teemperor, jankratochvil, labath, clayborg, RKSimon, courbet, jhenderson

Reviewed By: labath, clayborg

Subscribers: labath, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D62305

llvm-svn: 361503
2019-05-23 15:17:39 +00:00
..
x64 Fix LLDB warnings when compiling with Clang 8.0 2019-05-21 19:35:06 +00:00
x86 [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
CMakeLists.txt Implement GetLoadAddress for the Windows process plugin 2019-02-15 04:32:50 +00:00
DebuggerThread.cpp [lldb] fix cannot convert from 'nullptr' to 'lldb::thread_result_t' 2019-05-23 15:17:39 +00:00
DebuggerThread.h [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
ExceptionRecord.h [Windows] Dump more information about access violation exception 2019-04-29 07:29:25 +00:00
ForwardDecl.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
IDebugDelegate.h [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
LocalDebugDelegate.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LocalDebugDelegate.h [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
NtStructures.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ProcessWindows.cpp Fix LLDB warnings when compiling with Clang 8.0 2019-05-21 19:35:06 +00:00
ProcessWindows.h [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
ProcessWindowsLog.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ProcessWindowsLog.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RegisterContextWindows.cpp [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
RegisterContextWindows.h [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
TargetThreadWindows.cpp Fix LLDB warnings when compiling with Clang 8.0 2019-05-21 19:35:06 +00:00
TargetThreadWindows.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00