[llvm] [SFrames] Implement .cfi_restore, remember_state, and restore_state (PR #159832)

via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 24 09:04:36 PDT 2025


================
@@ -111,6 +111,8 @@ struct SFrameFDE {
   MCFragment *Frag;
   // Unwinding fres
   SmallVector<SFrameFRE> FREs;
+  // .cfi_remember_state stack
+  SmallVector<SFrameFRE> SaveState;
----------------
Sterling-Augustine wrote:

cfi directives are entirely linear and lexical, so authors have to keep that in mind.

That sequence would create an error. But it would work with two sequential .cfi_remember_state statements in a row.

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


More information about the llvm-commits mailing list