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
diff --git a/lib/Target/X86/Printer.cpp b/lib/Target/X86/Printer.cpp
index 0afd399..d36f298 100644
--- a/lib/Target/X86/Printer.cpp
+++ b/lib/Target/X86/Printer.cpp
@@ -351,7 +351,8 @@
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!");