MC'ize padding when padding the ULEB128 value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97087 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling 2010-02-25 00:24:52 +00:00
parent 2a1263b1e1
commit f0bd4cc1b6

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*/);
}
}