diff options
author | Chris Lattner <sabre@nondot.org> | 2012-01-31 03:39:24 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2012-01-31 03:39:24 +0000 |
commit | 0d3785e16543c7f94f11c8fd0becfe1ae91e4089 (patch) | |
tree | 5ad570de2078b72f61d1b9d88a0d997cbe4289c6 /llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | |
parent | 3a565d624180b876aa9dba139c805184be9e0283 (diff) | |
download | bcm5719-llvm-0d3785e16543c7f94f11c8fd0becfe1ae91e4089.tar.gz bcm5719-llvm-0d3785e16543c7f94f11c8fd0becfe1ae91e4089.zip |
don't emit a 1-byte object as a .fill. This is silly and causes
CodeGen/X86/global-sections.ll to fail with CDArray
llvm-svn: 149343
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 1e55de4494c..4c093665c8c 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -1615,7 +1615,9 @@ static void EmitGlobalConstantDataSequential(const ConstantDataSequential *CDS, int Value = isRepeatedByteSequence(CDS, AP.TM); if (Value != -1) { uint64_t Bytes = AP.TM.getTargetData()->getTypeAllocSize(CDS->getType()); - return AP.OutStreamer.EmitFill(Bytes, Value, AddrSpace); + // Don't emit a 1-byte object as a .fill. + if (Bytes > 1) + return AP.OutStreamer.EmitFill(Bytes, Value, AddrSpace); } // If this can be emitted with .ascii/.asciz, emit it as such. |