diff options
author | Chris Lattner <sabre@nondot.org> | 2003-09-10 19:52:24 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-09-10 19:52:24 +0000 |
commit | b3aad5d28f12344424787f983654ca46fa9d7e73 (patch) | |
tree | 6a422bd5b19225e83eaaaba1918db3e200493871 /lib/Target/X86 | |
parent | 2148bcb7e350dfafc5f91cc4db928582187eb2f6 (diff) | |
download | external_llvm-b3aad5d28f12344424787f983654ca46fa9d7e73.zip external_llvm-b3aad5d28f12344424787f983654ca46fa9d7e73.tar.gz external_llvm-b3aad5d28f12344424787f983654ca46fa9d7e73.tar.bz2 |
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
Diffstat (limited to 'lib/Target/X86')
-rw-r--r-- | lib/Target/X86/Printer.cpp | 3 | ||||
-rw-r--r-- | lib/Target/X86/X86AsmPrinter.cpp | 3 |
2 files changed, 4 insertions, 2 deletions
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!"); |