[llvm-commits] [llvm] r70297 - in /llvm/trunk: include/llvm/CodeGen/AsmPrinter.h lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Sanjiv Gupta
sanjiv.gupta at microchip.com
Tue Apr 28 09:34:21 PDT 2009
Author: sgupta
Date: Tue Apr 28 11:34:20 2009
New Revision: 70297
URL: http://llvm.org/viewvc/llvm-project?rev=70297&view=rev
Log:
Initialized arrays can be in any address space.
Modified:
llvm/trunk/include/llvm/CodeGen/AsmPrinter.h
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Modified: llvm/trunk/include/llvm/CodeGen/AsmPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/AsmPrinter.h?rev=70297&r1=70296&r2=70297&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/AsmPrinter.h (original)
+++ llvm/trunk/include/llvm/CodeGen/AsmPrinter.h Tue Apr 28 11:34:20 2009
@@ -390,7 +390,7 @@
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);
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=70297&r1=70296&r2=70297&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Tue Apr 28 11:34:20 2009
@@ -971,12 +971,13 @@
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 @@
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);
More information about the llvm-commits
mailing list