Thanks. The problem i'm facing is i want to get the address of the first element of an array and i have also tried using the createInBoundsGEP which takes the base pointer and the index value and a name. When i try passing '0' as the index im running into problems.<br>
<br>Thanks,<br>Rohith.<br><br><div class="gmail_quote">On Sun, Apr 25, 2010 at 10:27 PM, Eli Friedman <span dir="ltr"><<a href="mailto:eli.friedman@gmail.com">eli.friedman@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="h5">On Sun, Apr 25, 2010 at 5:15 PM, Rohith Goparaju <<a href="mailto:rgoparaj@umail.iu.edu">rgoparaj@umail.iu.edu</a>> wrote:<br>
>  Hi,<br>
><br>
>    I'm trying to create a GEP (inbounds) instruction . I was looking at the<br>
> createinboundsGEP method . I didnt get the inputiterator part. My question<br>
> how do i create a GEP instruction and what do i pass for the input iterator<br>
> arguments.<br>
<br>
</div></div>Generic answer to "how do I create an X instruction": use llc<br>
-march=cpp on an IR file containing the instruction, and read the<br>
result.<br>
<br>
For this particular question, the simplest way to get appropriate<br>
iterators is to put the indices into an std::vector and pass in the<br>
.begin() and .end() of it.<br>
<font color="#888888"><br>
-Eli<br>
</font></blockquote></div><br>