Hi, I am new to LLVM, and want to get the name of each argument for a given Function in a .bc file. Function.Argument.getName() returns "". Could somebody please help me figure this out? Thanks, ::Saman Zonouz -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090717/180898ff/attachment.html>
On Fri, Jul 17, 2009 at 6:02 AM, Saman Zonouz<samy_442 at yahoo.com> wrote:> Hi, > > I am new to LLVM, and want to get the name of each argument for a given > Function in a .bc file. > Function.Argument.getName() returns "". Could somebody please help me figure > this out? >This is untested, but maybe something like this: for (Function::arg_iterator I = F->arg_begin(), E = F->arg_end(); I != E; ++I) { std::string &Name = I->getName(); // Do with it what you will... } -bw