Value

A Value is the base type for various types of Operand values, to be used in Instructions.   Some things inherited from Value are aditionally used to define Local variables and Method Params.

Sometimes, the Value object is used directly to denote an Operand which is the name of a type.


The following are derived from Value:

Local
Param
FieldName
MethodName

Value objects may be directly constructed, or constructed through an Allocator object.

        Value(std::string Name, Type *tp) : name_(Name), type_(tp) { }

Access type

        Type *GetType() const { return type_; }
        void SetType(Type *tp) { type_ = tp; }

Access name

        const std::string &Name() const { return name_; }
        void Name(const std::string name) { name_ = name; }