Displaying 4 results from an estimated 4 matches for "tp52289p52294".
2012 Dec 05
2
[LLVMdev] how to get and modify a global variable inside a module
...on can return or modify the main memory address of a global variable
inside the module.
can you provide some reference code or program can achieve this?
thank you very much
--
View this message in context: http://llvm.1065342.n5.nabble.com/how-to-get-and-modify-a-global-variable-inside-a-module-tp52289p52294.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.
2012 Dec 05
0
[LLVMdev] how to get and modify a global variable inside a module
Hi Dong Chen,
You can write a ModulePass class and implement a runOnModule method.
Inside this method you can access Module::global_iterator and get a
reference to all global variables of a module. With this reference,
you can change this variable. But be careful, you may need to change
also the references to those variables. Have a look to the method
GlobalVariable::use_begin and use_end. They
2012 Dec 05
0
[LLVMdev] how to get and modify a global variable inside a module
...ory address of a global variable
> inside the module.
> can you provide some reference code or program can achieve this?
> thank you very much
>
>
>
> --
> View this message in context: http://llvm.1065342.n5.nabble.com/how-to-get-and-modify-a-global-variable-inside-a-module-tp52289p52294.html
> Sent from the LLVM - Dev mailing list archive at Nabble.com.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
2012 Dec 05
4
[LLVMdev] how to get and modify a global variable inside a module
recently, i use LLVM API to write a program to read *.ll and excute it
automatically.
Further more, i want to change some global variables inside a module.
i tried some functions provided by Module.h and ExecutionEngine.h but none
were seemed to match my need.
did someone have the experience or some advices?
thank you ;)
--
View this message in context: