mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-03 13:31:05 +00:00
Initialized arrays can be in any address space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70297 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fa4677b483
commit
d3d965714b
@ -390,7 +390,7 @@ namespace llvm {
|
||||
void EmitXXStructorList(Constant *List);
|
||||
void EmitGlobalConstantStruct(const ConstantStruct* CVS,
|
||||
unsigned AddrSpace);
|
||||
void EmitGlobalConstantArray(const ConstantArray* CVA);
|
||||
void EmitGlobalConstantArray(const ConstantArray* CVA, unsigned AddrSpace);
|
||||
void EmitGlobalConstantVector(const ConstantVector* CP);
|
||||
void EmitGlobalConstantFP(const ConstantFP* CFP, unsigned AddrSpace);
|
||||
void EmitGlobalConstantLargeInt(const ConstantInt* CI, unsigned AddrSpace);
|
||||
|
@ -971,12 +971,13 @@ void AsmPrinter::EmitString(const ConstantArray *CVA) const {
|
||||
O << '\n';
|
||||
}
|
||||
|
||||
void AsmPrinter::EmitGlobalConstantArray(const ConstantArray *CVA) {
|
||||
void AsmPrinter::EmitGlobalConstantArray(const ConstantArray *CVA,
|
||||
unsigned AddrSpace) {
|
||||
if (CVA->isString()) {
|
||||
EmitString(CVA);
|
||||
} else { // Not a string. Print the values in successive locations
|
||||
for (unsigned i = 0, e = CVA->getNumOperands(); i != e; ++i)
|
||||
EmitGlobalConstant(CVA->getOperand(i));
|
||||
EmitGlobalConstant(CVA->getOperand(i), AddrSpace);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1233,7 +1234,7 @@ void AsmPrinter::EmitGlobalConstant(const Constant *CV, unsigned AddrSpace) {
|
||||
EmitZeros(Size, AddrSpace);
|
||||
return;
|
||||
} else if (const ConstantArray *CVA = dyn_cast<ConstantArray>(CV)) {
|
||||
EmitGlobalConstantArray(CVA);
|
||||
EmitGlobalConstantArray(CVA , AddrSpace);
|
||||
return;
|
||||
} else if (const ConstantStruct *CVS = dyn_cast<ConstantStruct>(CV)) {
|
||||
EmitGlobalConstantStruct(CVS, AddrSpace);
|
||||
|
Loading…
Reference in New Issue
Block a user