[LLVMdev] question-TUD, germany

Chris Lattner sabre at nondot.org
Wed Feb 15 09:43:10 PST 2006


On Wed, 15 Feb 2006, Andrew Lenharth wrote:
> You can iterate over the uses of a value by using the iterator returned
> by Value::use_begin.  Then you simply check whether the use is an
> instruction and if so if the instruction's parent is the same parent as
> the value you are interested in.

Andrew is right.  Here are some more details:
http://llvm.cs.uiuc.edu/docs/ProgrammersManual.html#iterate_chains

The programmer's manual has a lot of good information: it's worth a skim 
for anyone working with LLVM that hasn't done so yet.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/




More information about the llvm-dev mailing list