[llvm-dev] get function parameters (not arguments)

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Fri Mar 10 07:25:42 PST 2017


On 10 March 2017 at 15:12, Mohammad Norouzi via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> for (auto& A : (cast<CallInst>(BI))->arg_operands ()) errs() << A.dump();
>
> but I get a and b instead.

This sounds really weird. If you're analyzing a CallInst in main, %a
and %b shouldn't even be available. Can you show us your actual IR and
output?

Cheers.

Tim.


More information about the llvm-dev mailing list