Only emit inter-field-padding if the amount of padding is != 0
authorChris Lattner <sabre@nondot.org>
Wed, 10 Sep 2003 19:52:24 +0000 (19:52 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 10 Sep 2003 19:52:24 +0000 (19:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8452 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/Printer.cpp
lib/Target/X86/X86AsmPrinter.cpp

index 0afd399e299c6bc79de6cfad885beb8b3b7662da..d36f298fe9962fa6a5ce0e43c36adba1ee1c69f1 100644 (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!");
index 0afd399e299c6bc79de6cfad885beb8b3b7662da..d36f298fe9962fa6a5ce0e43c36adba1ee1c69f1 100644 (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!");