mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-07 12:18:32 +00:00
[OCaml] Expose Llvm_executionengine.get_{global_value,function}_address.
Patch by Ramkumar Ramachandra <artagnon@gmail.com>. Also remove Llvm_executionengine.get_pointer_to_global, as it is actually deprecated and didn't appear in a stable release. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224801 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -115,8 +115,12 @@ CAMLprim value llvm_ee_add_global_mapping(LLVMValueRef Global, value Ptr,
|
||||
return Val_unit;
|
||||
}
|
||||
|
||||
/* Llvm.llvalue -> llexecutionengine -> int64 */
|
||||
CAMLprim value llvm_ee_get_pointer_to_global(LLVMValueRef Global,
|
||||
LLVMExecutionEngineRef EE) {
|
||||
return caml_copy_int64((int64_t) LLVMGetPointerToGlobal(EE, Global));
|
||||
CAMLprim value llvm_ee_get_global_value_address(value Name,
|
||||
LLVMExecutionEngineRef EE) {
|
||||
return caml_copy_int64((int64_t) LLVMGetGlobalValueAddress(EE, String_val(Name)));
|
||||
}
|
||||
|
||||
CAMLprim value llvm_ee_get_function_address(value Name,
|
||||
LLVMExecutionEngineRef EE) {
|
||||
return caml_copy_int64((int64_t) LLVMGetFunctionAddress(EE, String_val(Name)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user