projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
67ef9e4
)
Add a helper method.
author
Chris Lattner
<sabre@nondot.org>
Fri, 5 May 2006 00:51:42 +0000
(
00:51
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Fri, 5 May 2006 00:51:42 +0000
(
00:51
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28114
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/Use.h
patch
|
blob
|
history
diff --git
a/include/llvm/Use.h
b/include/llvm/Use.h
index eeff52fcb6a4e1797fe3a846340db95b7440dcfc..e817601f80cdda62bf433fe9fe30a65dff769bce 100644
(file)
--- a/
include/llvm/Use.h
+++ b/
include/llvm/Use.h
@@
-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();
+ }
};