Displaying 2 results from an estimated 2 matches for "constantpointer".
2015 May 18
2
[LLVMdev] copy value of a global's data field to another global
...lizer of the global.
My globals are complex nested structs, from which I want to extract e.g. one
double datafield.
Example:
>From a struct Stuct having double,array(3xint),float fields, I could extract
the second int value using the index sequence 0,1,1 with getGetElementPtr.
This gives me a constantPointer, but I would need to get a constInt...
Alex
David Blaikie wrote:
> On Sat, May 16, 2015 at 10:28 PM, Alexander Poddey
> <alexander.poddey at gmx.net
>> wrote:
>
>> Hi all,
>>
>> I can get access to the data stored in globals as follows:
>>
>> Glo...
2015 May 17
2
[LLVMdev] copy value of a global's data field to another global
Hi all,
I can get access to the data stored in globals as follows:
GlobalVariable* pGvarAct=_set_a_valid_global_;
const_ptr_indicesVec=_the_indexes_
llvm::Constant* pConst;
pConst=ConstantExpr::getGetElementPtr(pGvarAct, const_ptr_indicesVec);
and e.g. use this to repalece an argumrnt of an instruction like:
I->setOperand(someArgumentIndex,pConst);
However, getGetElementPtr returns a