[LLVMdev] Question about local variables

Nick Lewycky nicholas at mxc.ca
Fri Oct 21 19:03:03 PDT 2011


Ryan Taylor wrote:
> It looks like the AsmWriter is generating the local variables (SlotNum)s
> on the fly in that file (AsmWriter.cpp), so is there any way at all to
> get this information from the operation itself, via Instruction, Value
> or Type?

Nope! As you noticed, they're created on the fly...

...when the Value or Type is anonymous. If you want them to be 
persistent, values can have names via. the setName() call. "opt 
-instnamer" will name all your instructions, for example.

Nick



More information about the llvm-dev mailing list