llvm.org GIT mirror llvm / 023cfb6
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28163 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 14 years ago
2 changed file(s) with 10 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
140140
141141 Use &getUse() const { return *U; }
142142
143 /// getOperandNo - Return the operand # of this use in its User.
143 /// getOperandNo - Return the operand # of this use in its User. Defined in
144 /// User.h
144145 ///
145 unsigned getOperandNo() const {
146 return U - U->getUser()->op_begin();
147 }
146 unsigned getOperandNo() const;
148147 };
149148
150149
111111 template<> struct simplify_type
112112 : public simplify_type {};
113113
114
115 // value_use_iterator::getOperandNo - Requires the definition of the User class.
116 template
117 unsigned value_use_iterator::getOperandNo() const {
118 return U - U->getUser()->op_begin();
119 }
120
114121 } // End llvm namespace
115122
116123 #endif