search for: getaggregateel

Displaying 3 results from an estimated 3 matches for "getaggregateel".

2013 Mar 07
1
[LLVMdev] array of pointers
...2*] [i32* getelementptr inbounds ([256 x i32]* @CRC24ATable, i32 0, i32 0), i32* getelementptr inbounds ([256 x i32]* @CRC24BTable, i32 0, i32 0), i32* getelementptr inbounds ([256 x i32]* @CRC16Table, i32 0, i32 0), i32* getelementptr inbounds ([256 x i32]* @CRC8Table, i32 0, i32 0)] I can use getAggregateElement(uint) to access each of the 4 elements (pointers). But I am not able to figure out how to cast the element so that I can then access each of the GEP expressions and its operands. I tried dyn_cast return value of getAggregateElement(uint) into Instruction type - but that didn't yield a no...
2013 Oct 17
1
[LLVMdev] get the value of a Constant in LLVM IR
Hello, i parse the llvm IR (llvm-3.3 version) and when i meet a constant, i want to get it's value. eg i32 5, i want to get the 5. I am interested in ConstantInt-ConstantFP-ConstantArray-ConstantStruct subclasses. Things are a bit easier with ConstantInt and ConstantFP constants but how could i get the value of a ConstantArray? The
2015 May 27
2
[LLVMdev] convert GetElemtPtr result to pointer on element?
Hi Tim, I forgot to say that I try to do all this in the LLVM API, not IR. I read in a bc'ed program and try to edit it using the API. Alex Tim Northover wrote: >> But I can not succeed in using the getGetElementPtr result in >> constructing an initalizer for another global value (which expects a >> ConstantFP* and not a ConstantExpr*). > > The result of a