ssa: remove unreachable switch case

This commit is contained in:
Li Jie
2025-11-13 16:00:26 +08:00
parent 317de80b42
commit aeb5d82d3e

View File

@@ -276,8 +276,6 @@ func (b Builder) Defer(kind DoAction, fn Expr, args ...Expr) {
// nothing to do
case DeferInLoop:
// Loop defers rely on a dedicated drain loop inserted below.
default:
panic("unknown defer kind")
}
typ := b.saveDeferArgs(self, fn, args)
self.stmts = append(self.stmts, func(bits Expr) {
@@ -313,8 +311,6 @@ func (b Builder) Defer(kind DoAction, fn Expr, args ...Expr) {
b.Jump(condBlk)
b.SetBlockEx(exitBlk, AtEnd, true)
default:
panic("unknown defer kind")
}
})
}