forked from OSchip/llvm-project
It is valid to have unsigned arrays as constants... the linker may initialize them later
llvm-svn: 923
This commit is contained in:
parent
53516cd05b
commit
f96ef663e0
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue