douglas at dcc.ufmg.br
2010-Apr-08 16:43 UTC
[LLVMdev] [Fwd: Re: Check the location of the definition of a Value object]
> I tried: > --------------------- > //Value* pb corresponding to %2 > for (BasicBlock::iterator I=entry->begin(), e=entry.end(); I != e; I++) > { > if (I == pb) > return true; > } > return false; > ---------------------- > > However, I got errors when compiled the code. Could anyone give some > simple examples about this issue? >The method explained by John is more elegant. But if you want to use your code above, you may do so: //Value* pb corresponding to %2 for (BasicBlock::iterator I=entry->begin(), e=entry.end(); I != e; I++) { if (*I == pb) return true; } return false; ---------------------- Best, Douglas
Apparently Analagous Threads
- [LLVMdev] Check the location of the definition of a Value object
- [LLVMdev] Check the location of the definition of a Value object
- [LLVMdev] Question about Value Range Propagation
- [LLVMdev] Question about Value Range Propagation
- [LLVMdev] How to Load a Value?