<div dir="ltr"><div>if (Value->hasName())</div><div>   Value->getName()</div><div><br></div><div><a href="http://llvm.org/docs/doxygen/html/classllvm_1_1Value.html">http://llvm.org/docs/doxygen/html/classllvm_1_1Value.html</a></div><div><br></div><div>You can iterate the elements of the struct doing this:</div><div><br></div><div>If (Value->getType()->isStructTy())</div><div>   for(StructType::element_iterator ii = Value->element_begin(), ei = Value->element_end(); ii != ei; ++ii) {</div><div>    }</div><div>}</div><div><br></div><div>You could do this recursively for structs with structs of structs etc and so forth. Some permutation of this should work.</div><div><br></div><div><a href="http://llvm.org/docs/doxygen/html/classllvm_1_1StructType.html">http://llvm.org/docs/doxygen/html/classllvm_1_1StructType.html</a></div><div><br></div><div>-Ryan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 6, 2016 at 12:44 AM, Jiten Thakkar via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi All,<br>
I am working on a project as part of my graduate study which uses LLVM.<br>
I am relatively new to LLVM.<br>
My goal is to get names of the parameters to functions. If the parameter is a structure, then I also need to name of the fields of the structure.<br>
I assume that metadata info should provide this but so far I am unable to find any documentation regarding which would describe how to do it.<br>
Is there a way to do this? Is this even possible?<br>
Please let me know if any of this is confusing and I will try to describe it in detail.<br>
<br>
Thanks,<br>
Jiten<br>
______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank" rel="noreferrer">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
</blockquote></div><br></div>