Fix a compile warning on linux
authorStephane Sezer <sas@cd80.net>
Tue, 24 Oct 2017 23:46:00 +0000 (23:46 +0000)
committerStephane Sezer <sas@cd80.net>
Tue, 24 Oct 2017 23:46:00 +0000 (23:46 +0000)
Can't cast directly between a pointer to function and a pointer to
object.

llvm-svn: 316533

lldb/source/API/SBDebugger.cpp

index 0185f1e..3170dc7 100644 (file)
@@ -72,7 +72,7 @@ static llvm::sys::DynamicLibrary LoadPlugin(const lldb::DebuggerSP &debugger_sp,
     // TODO: mangle this differently for your system - on OSX, the first
     // underscore needs to be removed and the second one stays
     LLDBCommandPluginInit init_func =
-        (LLDBCommandPluginInit)dynlib.getAddressOfSymbol(
+        (LLDBCommandPluginInit)(uintptr_t)dynlib.getAddressOfSymbol(
             "_ZN4lldb16PluginInitializeENS_10SBDebuggerE");
     if (init_func) {
       if (init_func(debugger_sb))