llvm-project
45bddca2 - [CIR] Fix insertion point tracking for switch with cleanups (#201210)

Commit
3 days ago
[CIR] Fix insertion point tracking for switch with cleanups (#201210) We had some problems where we would incorrectly maintain the insertion point for switch statements that contained cleanup scopes. This resulted in cir.scope statements without a terminator, tripping a verification error. This change adds a RunCleanupsScope RAII object for the switch statement and adds a check inside popCleanup() to avoid moving the insertion point to the point after the now-closed cleanup scope if the insertion point had previously been somewhere other than inside the cleanup scope. Assisted-by: Cursor / claude-opus-4.8
Author
Parents
Loading