[Bf-blender-cvs] [6392e88] object_nodes: Use getFunctionAddress instead of deprecated getFunctionPointer.

Lukas Tönne noreply at git.blender.org
Tue Apr 5 16:33:24 CEST 2016


Commit: 6392e8885a0f288c317f04c677495dc0557844e4
Author: Lukas Tönne
Date:   Tue Apr 5 11:30:30 2016 +0200
Branches: object_nodes
https://developer.blender.org/rB6392e8885a0f288c317f04c677495dc0557844e4

Use getFunctionAddress instead of deprecated getFunctionPointer.

===================================================================

M	source/blender/blenvm/llvm/llvm_codegen.cc

===================================================================

diff --git a/source/blender/blenvm/llvm/llvm_codegen.cc b/source/blender/blenvm/llvm/llvm_codegen.cc
index dde5e11..30c67e4 100644
--- a/source/blender/blenvm/llvm/llvm_codegen.cc
+++ b/source/blender/blenvm/llvm/llvm_codegen.cc
@@ -285,15 +285,8 @@ FunctionLLVM *LLVMCompiler::compile_function(const string &name, const NodeGraph
 	
 	llvm_execution_engine()->finalizeObject();
 	
-	/* XXX according to docs, getFunctionAddress should be used
-	 * for MCJIT, but always returns 0
-	 */
-//	uint64_t address = llvm_execution_engine()->getFunctionAddress(name);
-//	uint64_t address = (uint64_t)llvm_execution_engine()->getPointerToFunction(func);
-	void (*fp)(void) = (void (*)(void))llvm_execution_engine()->getPointerToFunction(func);
-	printf("GOT FUNCTION %s: %p\n", name.c_str(), fp);
-	BLI_assert(fp != 0);
-	uint64_t address = (uint64_t)fp;
+	uint64_t address = llvm_execution_engine()->getFunctionAddress(name);
+	BLI_assert(address != 0);
 	
 	llvm_execution_engine()->removeModule(module);
 	delete module;




More information about the Bf-blender-cvs mailing list