mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 00:33:09 +00:00
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:
parent
44d2b947cb
commit
2b3c925d02
@ -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
Block a user