[llvm-dev] Getting variable names from LLVM Pass

Ridwan Shariffdeen via llvm-dev llvm-dev at lists.llvm.org
Mon May 21 01:38:15 PDT 2018


Hi,

I want to retrieve the variable names used in a statement, I tried the
following snippet,
but it only gives me the variable named in llvm bitcode. I need the
variable name in source code.

for (auto op = I.op_begin(); op != I.op_end(); op++) {
                        Value* v = op->get();
                        StringRef name = v->getName();
}

Is there specific documentation I can refer to implement this?

Thanks

-- 
*Ridwan Shariffdeen*
Graduate Student | National University of Singapore
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180521/9e636ceb/attachment.html>


More information about the llvm-dev mailing list