From 9df9afddcf14a93ad731d8d91e47222cd08c83bd Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 7 Jul 2004 18:07:46 +0000 Subject: [PATCH] Fix regressions in these testcases: Regression.Assembler.2002-01-24-BadSymbolTableAssert Regression.Assembler.2002-01-24-ValueRefineAbsType Found through the nightly tester :) llvm-svn: 14671 --- llvm/lib/VMCore/Value.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/lib/VMCore/Value.cpp b/llvm/lib/VMCore/Value.cpp index 9022e914c92d..a4f2669de012 100644 --- a/llvm/lib/VMCore/Value.cpp +++ b/llvm/lib/VMCore/Value.cpp @@ -32,7 +32,8 @@ static inline const Type *checkType(const Type *Ty) { Value::Value(const Type *ty, unsigned scid, const std::string &name) : SubclassID(scid), Ty(checkType(ty)), Name(name) { if (!isa(this) && !isa(this)) - assert((Ty->isFirstClassType() || Ty == Type::VoidTy) && + assert((Ty->isFirstClassType() || Ty == Type::VoidTy || + isa(ty)) && "Cannot create non-first-class values except for constants!"); }