reinterpret_cast may not convert a pointer-to-function to a
void-pointer. Take a detour through intptr_t and *then* convert to a
pointer-to-function.
This silences a warning emitted by GCC when building LLDB.
Differential Revision: http://reviews.llvm.org/D4631
llvm-svn: 213693
static ConstString g_lldb_so_dir;
if (!g_lldb_so_dir)
{
- FileSpec lldb_file_spec (Host::GetModuleFileSpecForHostAddress ((void *)Host::GetLLDBPath));
+ FileSpec lldb_file_spec(Host::GetModuleFileSpecForHostAddress(
+ reinterpret_cast<void *>(reinterpret_cast<intptr_t>(Host::GetLLDBPath))));
g_lldb_so_dir = lldb_file_spec.GetDirectory();
if (log)
log->Printf("Host::GetLLDBPath(ePathTypeLLDBShlibDir) => '%s'", g_lldb_so_dir.GetCString());