[PATCH] D125647: [ARM SEH 5] [MC] [Win64EH] Check that the SEH unwind opcodes match the actual instructions

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 16 13:13:10 PDT 2022


mstorsjo added inline comments.


================
Comment at: llvm/lib/Target/ARM/MCTargetDesc/ARMWinCOFFStreamer.cpp:256
+#ifndef NDEBUG
+  MCSymbol *Label = S.emitCFILabel();
+  CurFrame->EpilogEnd[CurrentEpilog] = Label;
----------------
efriedma wrote:
> I don't like changing whether we emit a label based on NDEBUG; that will affect the actual assembler text.  (The actual checking is also probably cheap enough we could just leave it on, but I'll leave that up to you.)
No, this isn't a regular label - the CFI labels are no-ops in assembly output:
```
MCSymbol *MCStreamer::emitCFILabel() {
  // Return a dummy non-null value so that label fields appear filled in when
  // generating textual assembly.
  return (MCSymbol *)1;
}
```

Yeah, the checking is cheap anyway though so it's no problem to leave it on.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125647



More information about the llvm-commits mailing list