<div dir="ltr"><div><div>Hi,<br><br></div>you can iterate over a function's formal parameters via Function::arg_iterator.<br><br></div>Regards,<br>Victor.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Sun, Mar 30, 2014 at 12:33 PM, lucefe <span dir="ltr"><<a href="mailto:noviceup@gmail.com" target="_blank">noviceup@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div><div><div><div><div>Hi, <br><br></div>For each variable, I want to figure out whether it is a parameter or not. How should I do that?<br><br></div>For example, in the next function, I want to know that variable 'i' is a parameter, and 'var' is a variable. <br>
<br></div>int test (int i) {<br></div> int var;<br><br></div> var = 2*i;<br><br></div> return var;<br><div><div><div><div><div>} <br><br></div><div>Thanks in advance.<span class="HOEnZb"><font color="#888888"><br>
<br></font></span></div><span class="HOEnZb"><font color="#888888"><div>lucefe<br></div></font></span></div></div>
</div></div></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div>