[llvm-commits] CVS: llvm/include/llvm/Use.h User.h
Chris Lattner
lattner at cs.uiuc.edu
Sun May 7 22:59:48 PDT 2006
Changes in directory llvm/include/llvm:
Use.h updated: 1.14 -> 1.15
User.h updated: 1.35 -> 1.36
---
Log message:
Move the definition of value_use_iterator::getOperandNo to User.h where the
definition of the User class is available, this fixes the build with some
compiler versions.
---
Diffs of the changes: (+10 -4)
Use.h | 7 +++----
User.h | 7 +++++++
2 files changed, 10 insertions(+), 4 deletions(-)
Index: llvm/include/llvm/Use.h
diff -u llvm/include/llvm/Use.h:1.14 llvm/include/llvm/Use.h:1.15
--- llvm/include/llvm/Use.h:1.14 Thu May 4 19:51:42 2006
+++ llvm/include/llvm/Use.h Mon May 8 00:59:36 2006
@@ -141,11 +141,10 @@
Use &getUse() const { return *U; }
- /// getOperandNo - Return the operand # of this use in its User.
+ /// getOperandNo - Return the operand # of this use in its User. Defined in
+ /// User.h
///
- unsigned getOperandNo() const {
- return U - U->getUser()->op_begin();
- }
+ unsigned getOperandNo() const;
};
Index: llvm/include/llvm/User.h
diff -u llvm/include/llvm/User.h:1.35 llvm/include/llvm/User.h:1.36
--- llvm/include/llvm/User.h:1.35 Thu Apr 21 15:11:51 2005
+++ llvm/include/llvm/User.h Mon May 8 00:59:36 2006
@@ -112,6 +112,13 @@
template<> struct simplify_type<const User::const_op_iterator>
: public simplify_type<User::const_op_iterator> {};
+
+// value_use_iterator::getOperandNo - Requires the definition of the User class.
+template<typename UserTy>
+unsigned value_use_iterator<UserTy>::getOperandNo() const {
+ return U - U->getUser()->op_begin();
+}
+
} // End llvm namespace
#endif
More information about the llvm-commits
mailing list