[llvm] dbc616e - [EHStreamer] Fix a "Continue to action" -fverbose-asm comment when multi-byte LEB128 encoding is needed
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 20 21:41:56 PDT 2020
Author: Fangrui Song
Date: 2020-09-20T21:41:48-07:00
New Revision: dbc616e9825080f617865f7698647985d7c24e5e
URL: https://github.com/llvm/llvm-project/commit/dbc616e9825080f617865f7698647985d7c24e5e
DIFF: https://github.com/llvm/llvm-project/commit/dbc616e9825080f617865f7698647985d7c24e5e.diff
LOG: [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.
Added:
Modified:
llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp b/llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp
index 99ee4567fa58..ad2f8dc70761 100644
--- a/llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp
@@ -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);
More information about the llvm-commits
mailing list