From bcf508cf6fbd1466535181f487e935b70bc1bc28 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 16 Oct 2004 18:06:07 +0000 Subject: [PATCH] Add new UndefValueVal type llvm-svn: 17038 --- llvm/include/llvm/Value.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/llvm/include/llvm/Value.h b/llvm/include/llvm/Value.h index 2aed4d2f503a..884b265dc161 100644 --- a/llvm/include/llvm/Value.h +++ b/llvm/include/llvm/Value.h @@ -126,6 +126,7 @@ public: BasicBlockVal, // This is an instance of BasicBlock FunctionVal, // This is an instance of Function 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 SimpleConstantVal, // This is some other type of Constant @@ -189,11 +190,12 @@ void Use::set(Value *V) { // the subtype header files to test to see if the value is a subclass... // template <> inline bool isa_impl(const Value &Val) { - return Val.getValueType() == Value::ConstantExprVal || - Val.getValueType() == Value::SimpleConstantVal || - Val.getValueType() == Value::ConstantAggregateZeroVal || + return Val.getValueType() == Value::SimpleConstantVal || Val.getValueType() == Value::FunctionVal || - Val.getValueType() == Value::GlobalVariableVal; + Val.getValueType() == Value::GlobalVariableVal || + Val.getValueType() == Value::ConstantExprVal || + Val.getValueType() == Value::ConstantAggregateZeroVal || + Val.getValueType() == Value::UndefValueVal; } template <> inline bool isa_impl(const Value &Val) { return Val.getValueType() == Value::ArgumentVal;