[LLVMdev] how to get and modify a local variable's value through executionEngine?

Óscar Fuentes ofv at wanadoo.es
Mon Dec 10 03:50:07 PST 2012

Dong Chen <jameschennerd at gmail.com> writes:

> hello guys,
> recently, i successfully get and modify global variable by execution engine.
> the functions i used are listed here:
>  int m=1;
>  EE->updateGlobalMapping(p->M->getGlobalVariable("x",true),&m);
>  EE->recompileAndRelinkFunction(EntryFn);
> x is the global variable in the module.
> but how to modify the local variable in the module?

A local variable does not exists until the function that defines it is
executed, so pretending to get and modify it as you do for the global
makes no sense.

More information about the llvm-dev mailing list