diff options
Diffstat (limited to 'lib/CodeGen/AsmPrinter.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp index 0394a02aa1..6dac1ea375 100644 --- a/lib/CodeGen/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter.cpp @@ -739,8 +739,8 @@ void AsmPrinter::EmitGlobalConstant(const Constant *CV) { // Check if padding is needed and insert one or more 0s. uint64_t fieldSize = TD->getTypeSize(field->getType()); uint64_t padSize = ((i == e-1? cvsLayout->StructSize - : cvsLayout->MemberOffsets[i+1]) - - cvsLayout->MemberOffsets[i]) - fieldSize; + : cvsLayout->getElementOffset(i+1)) + - cvsLayout->getElementOffset(i)) - fieldSize; sizeSoFar += fieldSize + padSize; // Now print the actual field value |