// Use is here to make keeping the "use" list of a Value up-to-date really easy.
//
class Use {
-private:
- /// init - specify Value and User
- /// @deprecated in 2.4, will be removed soon
- inline void init(Value *V, User *U);
public:
/// swap - provide a fast substitute to std::swap<Use>
/// that also works with less standard-compliant compilers
return OS;
}
-void Use::init(Value *V, User *) {
- Val = V;
- if (V) V->addUse(*this);
-}
-
void Use::set(Value *V) {
if (Val) removeFromList();
Val = V;