diff options
author | Dale Johannesen <dalej@apple.com> | 2007-10-01 23:08:35 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2007-10-01 23:08:35 +0000 |
commit | a7ac2bd4076096bb3a9986dd5a44f20c7f715518 (patch) | |
tree | d328983bae4b60c7473f266768520c6e499b3393 /lib/CodeGen/AsmPrinter.cpp | |
parent | d57c3884af90f992bc9033a61bc2d394fb8ca19a (diff) |
Fix stride computations for long double arrays.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42508 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp index 488185d9bb..0ad0ec7b1f 100644 --- a/lib/CodeGen/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter.cpp @@ -816,8 +816,12 @@ void AsmPrinter::EmitGlobalConstant(const Constant *CV) { 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) + for (unsigned i = 0, e = CVA->getNumOperands(); i != e; ++i) { EmitGlobalConstant(CVA->getOperand(i)); + const Type* EltTy = CVA->getType()->getElementType(); + uint64_t padSize = TD->getABITypeSize(EltTy) - TD->getTypeSize(EltTy); + EmitZeros(padSize); + } } return; } else if (const ConstantStruct *CVS = dyn_cast<ConstantStruct>(CV)) { |