[LLVMdev] Accessing instruction arguments

Scott Mikula mikula at uiuc.edu
Fri Sep 27 16:46:00 PDT 2002

Is there a convenient way to access the arguments of an arbitrary
instruction?  The programmer's manual describes how to iterate over the
values a given instruction uses, but that doesn't seem to be exactly the
same thing.

For instance, given a pointer to a FreeInst, how can I get the pointer
that is freed?  Or from a SetCondInst pointer, the two values that are
compared in the appropriate order?  Is iterating over the use-def chain
the right way to do it, or am I missing something?

Scott Mikula

More information about the llvm-dev mailing list