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

llvm-svn: 8452
This commit is contained in:
Chris Lattner 2003-09-10 19:52:24 +00:00
parent 6d2eab62b7
commit 59068a0d71
1 changed files with 2 additions and 1 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!");