MC'ize padding when padding the ULEB128 value.

llvm-svn: 97087
This commit is contained in:
Bill Wendling 2010-02-25 00:24:52 +00:00
parent 35b88592cd
commit 1be1ea831e

View File

@ -183,13 +183,11 @@ void DwarfPrinter::EmitULEB128(unsigned Value, const char *Desc,
Asm->OutStreamer.EmitIntValue(Byte, 1, /*addrspace*/0);
} while (Value);
if (PadTo)
while (PadTo--) {
unsigned char Byte = (PadTo ? 0x80 : 0x00);
if (Asm->VerboseAsm)
Asm->OutStreamer.AddComment("Padding");
Asm->OutStreamer.EmitIntValue(Byte, 1, /*addrspace*/0);
}
if (PadTo) {
if (PadTo > 1)
Asm->OutStreamer.EmitFill(PadTo - 1, 0x80/*fillval*/, 0/*addrspace*/);
Asm->OutStreamer.EmitFill(1, 0/*fillval*/, 0/*addrspace*/);
}
}