Add a helper method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28114 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-05-05 00:51:42 +00:00
parent 67ef9e4304
commit 71fe0f4a43

View File

@ -140,6 +140,12 @@ public:
UserTy *operator->() const { return operator*(); }
Use &getUse() const { return *U; }
/// getOperandNo - Return the operand # of this use in its User.
///
unsigned getOperandNo() const {
return U - U->getUser()->op_begin();
}
};