1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

[EHStreamer] Fix a "Continue to action" -fverbose-asm comment when multi-byte LEB128 encoding is needed

This only happens with more than 64 action records and it is difficult to construct a test.
This commit is contained in:
Fangrui Song 2020-09-20 21:41:29 -07:00
parent d6e49b7d70
commit e6e7c80f0e

View File

@ -587,15 +587,12 @@ MCSymbol *EHStreamer::emitExceptionTable() {
Asm->emitSLEB128(Action.ValueForTypeID);
// Action Record
//
// Self-relative signed displacement in bytes of the next action record,
// or 0 if there is no next action record.
if (VerboseAsm) {
if (Action.NextAction == 0) {
if (Action.Previous == unsigned(-1)) {
Asm->OutStreamer->AddComment(" No further actions");
} else {
unsigned NextAction = Entry + (Action.NextAction + 1) / 2;
Asm->OutStreamer->AddComment(" Continue to action "+Twine(NextAction));
Asm->OutStreamer->AddComment(" Continue to action " +
Twine(Action.Previous + 1));
}
}
Asm->emitSLEB128(Action.NextAction);