Only emit inter-field-padding if the amount of padding is != 0
llvm-svn: 8452
diff --git a/llvm/lib/Target/X86/Printer.cpp b/llvm/lib/Target/X86/Printer.cpp
index 0afd399..d36f298 100644
--- a/llvm/lib/Target/X86/Printer.cpp
+++ b/llvm/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!");