[LLVMdev] Operand, instruction

Devang Patel devang.patel at gmail.com
Sun Mar 28 12:51:28 PDT 2010


On Fri, Mar 26, 2010 at 6:53 AM, help__me_please
<krishnadhan at cse.iitb.ac.in> wrote:
>
> Can anyone tell how to get the result name or instruction name of all
> instruction? For example if the instruction is "x=add y,z", here i need "x".
> Using getName(), i am getting some instructions result name, but llvm
> produces some instruction like "%0=add i32 tmp, 1", here getName() shows
> empty string as result name.
> So please help.
>

Instruction names are optional and not reliable. Why do you need a
name ? You can use use_iterator to find instruction's uses.
-
Devang



More information about the llvm-dev mailing list