#ifndef _SYSYF_USER_H_ #define _SYSYF_USER_H_ #include "Value.h" #include // #include class User : public Value { public: User(Type *ty, const std::string &name = "", unsigned num_ops = 0); ~User() = default; std::vector& get_operands(); // start from 0 Value *get_operand(unsigned i) const; // start from 0 void set_operand(unsigned i, Value *v); void add_operand( Value *v); unsigned get_num_operand() const; void remove_use_of_ops(); void remove_operands(int index1,int index2); private: // std::unique_ptr< std::list > operands_; // operands of this value std::vector operands_; // operands of this value unsigned num_ops_; }; #endif // _SYSYF_USER_H_