[PATCH] D125645: [ARM SEH 3] [ARM] [MC] Add support for writing ARM WinEH unwind info

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 17 13:48:28 PDT 2022


mstorsjo added inline comments.


================
Comment at: llvm/include/llvm/MC/MCWinEH.h:60
   MapVector<MCSymbol*, std::vector<Instruction>> EpilogMap;
+  DenseMap<MCSymbol *, unsigned> EpilogConditions;
 
----------------
I guess it'd be much preferrable here, to change this into a map containing a struct instead, e.g.:
```
struct Epilog {
    std::vector<Instruction> Instructions;
    unsigned Condition;
};
MapVector<MCSymbol *, Epilog> EpilogMap;
```
And if doing that, I guess it'd be best to do such a refactoring (without the Condition field) as a separate preceding commit. But posting it in this form for now, for potential comments on the rest of the changes.


================
Comment at: llvm/lib/MC/MCWin64EH.cpp:1431
+    streamer.emitValue(
+        MCBinaryExpr::createOr(FuncLengthExpr,
+                               MCConstantExpr::create(row1, context), context),
----------------
How do I make this into an ARM specific fixup, which could do range checking for `FuncLengthExpr` and error out if the function is too long?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125645/new/

https://reviews.llvm.org/D125645



More information about the llvm-commits mailing list