[LLVMdev] Get Name of numbered variables
Krzysztof Parzyszek
kparzysz at codeaurora.org
Sat Feb 23 17:45:40 PST 2013
On 2/22/2013 9:11 AM, Blind Faith wrote:
> You can get the name of a variable by using the method getName() of
> llvm::Value. However it returns a blank string if the variable is a
> numbered variable, such as %11. How can I make it return %11 in such case.
The numbers come from SlotTracker in AsmWriter.cpp. They are basically
generated when the IR needs to be printed in the human readable form,
and don't necessarily exist otherwise. They may also change over time,
as the IR changes (i.e. the same value may get a different number next
time).
-Krzysztof
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
More information about the llvm-dev
mailing list