[LLVMdev] Can I add GlobalVariable in MachineFunctionPass ?

Antony Yu swpenim at gmail.com
Mon Aug 5 03:40:48 PDT 2013


Hello,

I want to add a global variable of arrayType in my MachineFunctionPass.
However, I only get const Module from MachineFunction.getMMI().getModule().
I can't add any global variable to a const Module. 
Another way is to add a global variable in doInitialization in my
MachineFunctionPass, but I can't determine the size of my arrayType for
global variable in doInitialization.

Is there any suggestion that can help me achieve this?

Thanks in advance.
Antony Yu



--
View this message in context: http://llvm.1065342.n5.nabble.com/Can-I-add-GlobalVariable-in-MachineFunctionPass-tp60165.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.



More information about the llvm-dev mailing list