[LLVMdev] how to get and modify a global variable inside a module

Dong Chen jameschennerd at gmail.com
Wed Dec 5 05:49:31 PST 2012


hi Duncan Sands,
i have tried the functions:
GlobalValue *  getNamedValue (StringRef Name) const  
GlobalVariable *  getGlobalVariable (StringRef Name, bool
AllowInternal=false) const  
GlobalVariable *  getNamedGlobal (StringRef Name) const  
but i think these functions just return the ID or something else (not the
Global Variable's main memory address, i am not sure)
here is the thing. i want to know the exact main memory address of the
Global Varibale's address when ExecutionEngine execut the *.ll code. further
more, i want to change the address, is it possible?
do you have some good idea?
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-tp52289p52295.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.



More information about the llvm-dev mailing list