-//===----------------------------------------------------------------------===//
-// Type Checking Templates
-//===----------------------------------------------------------------------===//
-
-// isa<X> - Return true if the parameter to the template is an instance of the
-// template type argument. Used like this:
-//
-// if (isa<Type>(myVal)) { ... }
-//
-template <class X, class Y>
-inline bool isa(Y Val) {
- assert(Val && "isa<Ty>(NULL) invoked!");
- return X::classof(Val);
-}
+ /// 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
+ PseudoSourceValueVal, // This is an instance of PseudoSourceValue
+ InstructionVal, // This is an instance of Instruction
+
+ // Markers:
+ ConstantFirstVal = FunctionVal,
+ ConstantLastVal = ConstantPointerNullVal
+ };