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
This commit is contained in:
Chris Lattner 2004-07-07 18:07:46 +00:00
parent ef84814ea9
commit 9df9afddcf
1 changed files with 2 additions and 1 deletions

View File

@ -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<Constant>(this) && !isa<BasicBlock>(this))
assert((Ty->isFirstClassType() || Ty == Type::VoidTy) &&
assert((Ty->isFirstClassType() || Ty == Type::VoidTy ||
isa<OpaqueType>(ty)) &&
"Cannot create non-first-class values except for constants!");
}