[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;