Function Argument in LLVM

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

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