pub fn add_global_mapping(&self, value: &dyn AnyValue, addr: usize) {
        unsafe {
            LLVMAddGlobalMapping(self.execution_engine_inner(), value.as_value_ref(), addr as *mut _)
        }
    }
/// Maps the specified value to an address.
///
/// # Example
/// ```no_run
/// use inkwell::targets::{InitializationConfig, Target};
/// use inkwell::context::Context;
/// use inkwell::OptimizationLevel;
///
/// Target::initialize_native(&InitializationConfig::default()).unwrap();
///
/// extern fn sumf(a: f64, b: f64) -> f64 {
///     a + b
/// }
///
/// let context = Context::create();
/// let module = context.create_module("test");
/// let builder = context.create_builder();
///
/// let ft = context.f64_type();
/// let fnt = ft.fn_type(&[], false);
///
/// let f = module.add_function("test_fn", fnt, None);
/// let b = context.append_basic_block(&f, "entry");
///
/// builder.position_at_end(&b);
///
/// let extf = module.add_function("sumf", ft.fn_type(&[ft.into(), ft.into()], false), None);
///
/// let argf = ft.const_float(64.);
/// let call_site_value = builder.build_call(extf, &[argf.into(), argf.into()], "retv");
/// let retv = call_site_value.try_as_basic_value().left().unwrap().into_float_value();
///
/// builder.build_return(Some(&retv));
///
/// let mut ee = module.create_jit_execution_engine(OptimizationLevel::None).unwrap();
/// ee.add_global_mapping(&extf, sumf as usize);
///
/// let result = unsafe { ee.run_function(&f, &[]) }.as_float(&ft);
///
/// assert_eq!(result, 128.);
/// ```
Maps the specified value to an address.
Maps the specified value to an address .
pub fn add_global_mapping(&self, value: &dyn AnyValue, addr: usize) {
        unsafe {
            LLVMAddGlobalMapping(self.execution_engine_inner(), value.as_value_ref(), addr as *mut _)
        }
    }
pub fn add_global_mapping ( & self , value : & dyn AnyValue , addr : usize ) { unsafe { LLVMAddGlobalMapping ( self . execution_engine_inner ( ) , value . as_value_ref ( ) , addr as * mut _ ) } }
Maps the specified value to an address.
Maps the specified value to an address .
&self
value
&dyn AnyValue
addr
usize
&self
value
&dyn AnyValue
addr
usize
example
```no_run
use inkwell::targets::{InitializationConfig, Target};
use inkwell::context::Context;
use inkwell::OptimizationLevel.

:initialize_native(&InitializationConfig::default()).unwrap().



let context = Context::create();
let module = context.create_module("test");
let builder = context.create_builder().

let ft = context.f64_type();
let fnt = ft.fn_type(&[], false).

let f = module.add_function("test_fn", fnt, None);
let b = context.append_basic_block(&f, "entry").

builder.position_at_end(&b).

let extf = module.add_function("sumf", ft.fn_type(&[ft.into(), ft.into()], false), None).

let argf = ft.const_float(64.);
let call_site_value = builder.build_call(extf, &[argf.into(), argf.into()], "retv");
let retv = call_site_value.try_as_basic_value().left().unwrap().into_float_value().

builder.build_return(Some(&retv)).

let mut ee = module.create_jit_execution_engine(OptimizationLevel::None).unwrap();
ee.add_global_mapping(&extf, sumf as usize).

let result = unsafe { ee.run_function(&f, &[]) }.as_float(&ft).


` ` ` no_run use inkwell :: targets :: { InitializationConfig Target } ; use inkwell :: context :: Context ; use inkwell :: OptimizationLevel . : initialize_native ( &InitializationConfig :: default () ) . unwrap () . let context = Context :: create () ; let module = context . create_module ( " test " ) ; let builder = context . create_builder () . let ft = context . f64_type () ; let fnt = ft . fn_type ( & [] false ) . let f = module . add_function ( " test_fn " fnt None ) ; let b = context . append_basic_block ( &f " entry " ) . builder . position_at_end ( &b ) . let extf = module . add_function ( " sumf " ft . fn_type ( & [ ft . into () ft . into () ] false ) None ) . let argf = ft . const_float ( 64 . ) ; let call_site_value = builder . build_call ( extf & [ argf . into () argf . into () ] " retv " ) ; let retv = call_site_value . try_as_basic_value () . left () . unwrap () . into_float_value () . builder . build_return ( Some ( &retv )) . let mut ee = module . create_jit_execution_engine ( OptimizationLevel :: None ) . unwrap () ; ee . add_global_mapping ( &extf sumf as usize ) . let result = unsafe { ee . run_function ( &f & [] ) } . as_float ( &ft ) .