[llvm-commits] CVS: llvm/include/llvm/Use.h
Chris Lattner
lattner at cs.uiuc.edu
Thu May 4 17:51:54 PDT 2006
Changes in directory llvm/include/llvm:
Use.h updated: 1.13 -> 1.14
---
Log message:
Add a helper method.
---
Diffs of the changes: (+6 -0)
Use.h | 6 ++++++
1 files changed, 6 insertions(+)
Index: llvm/include/llvm/Use.h
diff -u llvm/include/llvm/Use.h:1.13 llvm/include/llvm/Use.h:1.14
--- llvm/include/llvm/Use.h:1.13 Mon Mar 27 16:49:07 2006
+++ llvm/include/llvm/Use.h Thu May 4 19:51:42 2006
@@ -140,6 +140,12 @@
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();
+ }
};
More information about the llvm-commits
mailing list