Add support for opaque hash values.

This commit is contained in:
Matthias Vallentin 2012-12-11 16:24:52 -08:00
parent 23ca1c90ef
commit 624003f036
6 changed files with 340 additions and 0 deletions

View file

@ -1013,6 +1013,24 @@ protected:
VectorType* vector_type;
};
// See OpaqueVal.h for derived classes.
class OpaqueVal : public Val {
public:
OpaqueVal(OpaqueType* t);
virtual ~OpaqueVal();
// Determines whether the opaque value is in a valid state.
virtual bool IsValid() const;
protected:
friend class Val;
OpaqueVal() { }
DECLARE_SERIAL(OpaqueVal);
OpaqueType* opaque_type;
};
// Checks the given value for consistency with the given type. If an
// exact match, returns it. If promotable, returns the promoted version,