It is valid to have unsigned arrays as constants... the linker may initialize them later

llvm-svn: 923
This commit is contained in:
Chris Lattner 2001-10-20 06:43:05 +00:00
parent 53516cd05b
commit f96ef663e0
2 changed files with 0 additions and 8 deletions

View File

@ -1071,11 +1071,6 @@ ConstPool : ConstPool OptAssign CONST ConstVal {
| ConstPool OptAssign UNINIT GlobalType Types {
const Type *Ty = *$5;
// Global declarations appear in Constant Pool
if (isa<ArrayType>(Ty) && cast<ArrayType>(Ty)->isUnsized()) {
ThrowException("Type '" + Ty->getDescription() +
"' is not a sized type!");
}
GlobalVariable *GV = new GlobalVariable(Ty, $4);
if (!setValueName(GV, $2)) { // If not redefining...
CurModule.CurrentModule->getGlobalList().push_back(GV);

View File

@ -91,9 +91,6 @@ GlobalVariable::GlobalVariable(const Type *Ty, bool isConstant,
: GlobalValue(PointerType::get(Ty), Value::GlobalVariableVal, Name),
Constant(isConstant) {
if (Initializer) Operands.push_back(Use((Value*)Initializer, this));
assert(!isConstant || hasInitializer() &&
"Globals Constants must have an initializer!");
}
// Specialize setName to take care of symbol table majik