[cleanup] Add a getOperandNo method to the Use class and implement it
[oota-llvm.git] / include / llvm / IR / Use.h
index 62586f5b3d82be8251ff582b3448f1b4f5fe48d6..37967f8c0232f0b30c24e2116ea220ff2f1bffb5 100644 (file)
@@ -116,6 +116,9 @@ public:
 
   Use *getNext() const { return Next; }
 
+  /// \brief Return the operand # of this use in its User.
+  unsigned getOperandNo() const;
+
   /// \brief Initializes the waymarking tags on an array of Uses.
   ///
   /// This sets up the array of Uses such that getUser() can find the User from
@@ -208,9 +211,8 @@ public:
   Use &getUse() const { return *U; }
 
   /// \brief Return the operand # of this use in its User.
-  ///
-  /// Defined in User.h
-  unsigned getOperandNo() const;
+  /// FIXME: Replace all callers with a direct call to Use::getOperandNo.
+  unsigned getOperandNo() const { return U->getOperandNo(); }
 };
 
 // Create wrappers for C Binding types (see CBindingWrapping.h).