mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
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
This commit is contained in:
parent
8f102298a0
commit
5547cb8346
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user