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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@923 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2001-10-20 06:43:05 +00:00
parent 44d2b947cb
commit 2b3c925d02
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