-// real_type - Provide a macro to get the real type of a value that might be
-// a use. This provides a typedef 'Type' that is the argument type for all
-// non UseTy types, and is the contained pointer type of the use if it is a
-// UseTy.
-//
-template <class X> class real_type { typedef X Type; };
-template <class X> class real_type <class UseTy<X> > { typedef X *Type; };
+ /// An enumeration for keeping track of the concrete subclass of Value that
+ /// is actually instantiated. Values of this enumeration are kept in the
+ /// Value classes SubclassID field. They are used for concrete type
+ /// identification.
+ enum ValueTy {
+ ArgumentVal, // This is an instance of Argument
+ BasicBlockVal, // This is an instance of BasicBlock
+ FunctionVal, // This is an instance of Function
+ GlobalAliasVal, // This is an instance of GlobalAlias
+ GlobalVariableVal, // This is an instance of GlobalVariable
+ UndefValueVal, // This is an instance of UndefValue
+ ConstantExprVal, // This is an instance of ConstantExpr
+ ConstantAggregateZeroVal, // This is an instance of ConstantAggregateNull
+ ConstantIntVal, // This is an instance of ConstantInt
+ ConstantFPVal, // This is an instance of ConstantFP
+ ConstantArrayVal, // This is an instance of ConstantArray
+ ConstantStructVal, // This is an instance of ConstantStruct
+ ConstantVectorVal, // This is an instance of ConstantVector
+ ConstantPointerNullVal, // This is an instance of ConstantPointerNull
+ InlineAsmVal, // This is an instance of InlineAsm
+ InstructionVal, // This is an instance of Instruction
+
+ // Markers:
+ ConstantFirstVal = FunctionVal,
+ ConstantLastVal = ConstantPointerNullVal
+ };