aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/AsmParser/llvmAsmParser.y5
-rw-r--r--lib/VMCore/Function.cpp5
2 files changed, 1 insertions, 9 deletions
diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y
index 28de8e1ef0..591b8e85ab 100644
--- a/lib/AsmParser/llvmAsmParser.y
+++ b/lib/AsmParser/llvmAsmParser.y
@@ -881,11 +881,6 @@ ConstPool : ConstPool OptAssign ConstVal {
| ConstPool OptAssign GlobalType ResolvedVal {
const Type *Ty = $4->getType();
// Global declarations appear in Constant Pool
- if (Ty->isArrayType() && Ty->castArrayType()->isUnsized()) {
- ThrowException("Type '" + Ty->getDescription() +
- "' is not a sized type!");
- }
-
ConstPoolVal *Initializer = $4->castConstant();
if (Initializer == 0)
ThrowException("Global value initializer is not a constant!");
diff --git a/lib/VMCore/Function.cpp b/lib/VMCore/Function.cpp
index 47a85395a3..5d1132f0a7 100644
--- a/lib/VMCore/Function.cpp
+++ b/lib/VMCore/Function.cpp
@@ -86,10 +86,7 @@ GlobalVariable::GlobalVariable(const Type *Ty, bool isConstant,
ConstPoolVal *Initializer = 0,
const string &Name = "")
: User(Ty, Value::GlobalVal, Name), Parent(0), Constant(isConstant) {
- assert(Ty->isPointerType() && // No unsized array pointers
- (!Ty->castPointerType()->isArrayType() ||
- Ty->castPointerType()->castArrayType()->isSized()) &&
- "Global Variables must be pointers to a sized type!");
+ assert(Ty->isPointerType() && "Global Variables must be pointers!");
if (Initializer) Operands.push_back(Use((Value*)Initializer, this));
assert(!isConstant || hasInitializer() &&