aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-07-07 18:07:46 +0000
committerChris Lattner <sabre@nondot.org>2004-07-07 18:07:46 +0000
commit5c45e6db391bb2dfe361236403c4979f421c726c (patch)
treecb3ea363d3a6bbf44baf0cb8ac48ae1cf68bbdd4 /lib/VMCore
parentb093259edde0a0557d27f0925ca06bf10e78ecca (diff)
downloadexternal_llvm-5c45e6db391bb2dfe361236403c4979f421c726c.zip
external_llvm-5c45e6db391bb2dfe361236403c4979f421c726c.tar.gz
external_llvm-5c45e6db391bb2dfe361236403c4979f421c726c.tar.bz2
Fix regressions in these testcases:
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
Diffstat (limited to 'lib/VMCore')
-rw-r--r--lib/VMCore/Value.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VMCore/Value.cpp b/lib/VMCore/Value.cpp
index 9022e91..a4f2669 100644
--- a/lib/VMCore/Value.cpp
+++ b/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<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!");
}