Fix regressions in these testcases:
authorChris Lattner <sabre@nondot.org>
Wed, 7 Jul 2004 18:07:46 +0000 (18:07 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 7 Jul 2004 18:07:46 +0000 (18:07 +0000)
 Regression.Assembler.2002-01-24-BadSymbolTableAssert
 Regression.Assembler.2002-01-24-ValueRefineAbsType

Found through the nightly tester :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14671 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/Value.cpp

index 9022e914c92d1df70fb951be7ce244663fbb5f56..a4f2669de0126be24aa08d7d7fb123d6a3069f74 100644 (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!");
 }