aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/AsmPrinter.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp
index 6dac1ea375..2d7dec40f7 100644
--- a/lib/CodeGen/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter.cpp
@@ -738,7 +738,7 @@ 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
+ uint64_t padSize = ((i == e-1? cvsLayout->getSizeInBytes()
: cvsLayout->getElementOffset(i+1))
- cvsLayout->getElementOffset(i)) - fieldSize;
sizeSoFar += fieldSize + padSize;
@@ -749,7 +749,7 @@ void AsmPrinter::EmitGlobalConstant(const Constant *CV) {
// Insert the field padding unless it's zero bytes...
EmitZeros(padSize);
}
- assert(sizeSoFar == cvsLayout->StructSize &&
+ assert(sizeSoFar == cvsLayout->getSizeInBytes() &&
"Layout of constant struct may be incorrect!");
return;
} else if (const ConstantFP *CFP = dyn_cast<ConstantFP>(CV)) {