[llvm] [MC][debug_frame] Fix a bug in MCDwarfFrameEmitter::emit() so that per-function CIE can be generated when CIEs are different (PR #192727)

via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 17 18:47:53 PDT 2026


================
@@ -1979,7 +1979,8 @@ void MCDwarfFrameEmitter::emit(MCObjectStreamer &Streamer, bool IsEH) {
       continue;
 
     CIEKey Key(Frame);
-    if (!LastCIEStart || (IsEH && Key != LastKey)) {
+    if (!LastCIEStart ||
+        (Key != LastKey && (IsEH || AsmInfo->usePerFunctionDebugFrameCIE()))) {
----------------
jaewookshin701 wrote:

With the latest bug-fix change, I've added a test case.

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


More information about the llvm-commits mailing list