From b3aad5d28f12344424787f983654ca46fa9d7e73 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 10 Sep 2003 19:52:24 +0000 Subject: 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 --- lib/Target/X86/Printer.cpp | 3 ++- lib/Target/X86/X86AsmPrinter.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/Target/X86') 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 @@ 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!"); diff --git a/lib/Target/X86/X86AsmPrinter.cpp b/lib/Target/X86/X86AsmPrinter.cpp index 0afd399..d36f298 100644 --- a/lib/Target/X86/X86AsmPrinter.cpp +++ b/lib/Target/X86/X86AsmPrinter.cpp @@ -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!"); -- cgit v1.1