mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
encapsulate the rest of the StructLayout members.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34157 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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)) {
|
||||
|
Reference in New Issue
Block a user