Hello I have a pointer to llvm::Value *,I know its a pointer to some llvm::CompositeType (vector) Could you please tell me how can I get a value of specific index in the vector. Thank you. Yakov -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111107/0b475afd/attachment.html>
Yakov Malinkovich wrote:> Hello > I have a pointer to llvm::Value *,I know its a pointer to some > llvm::CompositeType (vector) > Could you please tell me how can I get a value of specific index in the > vector. > Thank you.Use the extractelement instruction, like so: Value *Elem = Builder.CreateExtractElement(MyVectorValue, ElementNumber); See http://llvm.org/docs/LangRef.html#i_extractelement . Nick