Still ugly, but at least Use.h is self-contained again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259191
91177308-0d34-0410-b5e6-
96231b3b80d8
inline void set(Value *Val);
- Value *operator=(Value *RHS) {
- set(RHS);
- return RHS;
- }
- const Use &operator=(const Use &RHS) {
- set(RHS.Val);
- return *this;
- }
+ inline Value *operator=(Value *RHS);
+ inline const Use &operator=(const Use &RHS);
Value *operator->() { return Val; }
const Value *operator->() const { return Val; }
if (V) V->addUse(*this);
}
+Value *Use::operator=(Value *RHS) {
+ set(RHS);
+ return RHS;
+}
+
+const Use &Use::operator=(const Use &RHS) {
+ set(RHS.Val);
+ return *this;
+}
+
template <class Compare> void Value::sortUseList(Compare Cmp) {
if (!UseList || !UseList->Next)
// No need to sort 0 or 1 uses.