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
diff --git a/llvm/lib/VMCore/Value.cpp b/llvm/lib/VMCore/Value.cpp
index 9022e91..a4f2669 100644
--- a/llvm/lib/VMCore/Value.cpp
+++ b/llvm/lib/VMCore/Value.cpp
@@ -32,7 +32,8 @@
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!");
}