Change HostThread::GetNativeThread() to return a derived reference.

Previously using HostThread::GetNativeThread() required an ugly
cast to most-derived type.  This solves the issue by simply returning
the derived type directly.

llvm-svn: 222185
This commit is contained in:
Zachary Turner
2014-11-17 22:42:57 +00:00
parent 5453933867
commit c30189921e
8 changed files with 46 additions and 32 deletions

View File

@@ -185,7 +185,7 @@ DebuggerThread::HandleCreateProcessEvent(const CREATE_PROCESS_DEBUG_INFO &info,
m_process = HostProcess(info.hProcess);
((HostProcessWindows &)m_process.GetNativeProcess()).SetOwnsHandle(false);
m_main_thread = HostThread(info.hThread);
((HostThreadWindows &)m_main_thread.GetNativeThread()).SetOwnsHandle(false);
m_main_thread.GetNativeThread().SetOwnsHandle(false);
m_image_file = info.hFile;
lldb::addr_t load_addr = reinterpret_cast<lldb::addr_t>(info.lpBaseOfImage);