[clang] [llvm] [win][x64] Unwind v2 3/n: Add support for emitting unwind v2 information (equivalent to MSVC /d2epilogunwind) (PR #129142)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 28 10:47:52 PST 2025


================
@@ -500,7 +500,8 @@ MCSymbol *MCStreamer::emitLineTableLabel() {
 MCSymbol *MCStreamer::emitCFILabel() {
   // Return a dummy non-null value so that label fields appear filled in when
   // generating textual assembly.
-  return (MCSymbol *)1;
+  static size_t DummyLabelValue = 0;
----------------
efriedma-quic wrote:

emitCFILabel() is overridden for binary streamers, so this implementation is only used if your outputting text.  If you're outputting text, you shouldn't need to construct the unwind maps in the first place.

If you want to construct the maps anyway, for some reason, I'd suggest identifying entries in the EpilogMap using an integer ID, instead of the label.

https://github.com/llvm/llvm-project/pull/129142


More information about the cfe-commits mailing list