Only emit inter-field-padding if the amount of padding is != 0

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8452 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-09-10 19:52:24 +00:00
parent 2148bcb7e3
commit b3aad5d28f
2 changed files with 4 additions and 2 deletions

View File

@ -351,7 +351,8 @@ void Printer::printConstantValueOnly(const Constant *CV) {
printConstantValueOnly(field);
// Insert the field padding unless it's zero bytes...
O << "\t.zero\t " << padSize << "\n";
if (padSize)
O << "\t.zero\t " << padSize << "\n";
}
assert(sizeSoFar == cvsLayout->StructSize &&
"Layout of constant struct may be incorrect!");

View File

@ -351,7 +351,8 @@ void Printer::printConstantValueOnly(const Constant *CV) {
printConstantValueOnly(field);
// Insert the field padding unless it's zero bytes...
O << "\t.zero\t " << padSize << "\n";
if (padSize)
O << "\t.zero\t " << padSize << "\n";
}
assert(sizeSoFar == cvsLayout->StructSize &&
"Layout of constant struct may be incorrect!");