diff options
author | Sanjiv Gupta <sanjiv.gupta@microchip.com> | 2009-04-28 16:34:20 +0000 |
---|---|---|
committer | Sanjiv Gupta <sanjiv.gupta@microchip.com> | 2009-04-28 16:34:20 +0000 |
commit | d3d965714b89c5d5aeb65fb5ce06e081f0b3c049 (patch) | |
tree | ac11a5407250d6ef776da59150dad53d8b3b924a /lib/CodeGen | |
parent | fa4677b483b85217ac216f7e8d401c40cbe348aa (diff) | |
download | external_llvm-d3d965714b89c5d5aeb65fb5ce06e081f0b3c049.zip external_llvm-d3d965714b89c5d5aeb65fb5ce06e081f0b3c049.tar.gz external_llvm-d3d965714b89c5d5aeb65fb5ce06e081f0b3c049.tar.bz2 |
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
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index f1a45fd..a815aab 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -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); |