llgo/ssa: use b.CreateUnreachable to panic

This commit is contained in:
xushiwei
2024-04-29 03:36:19 +08:00
parent 616596e571
commit cb507f43a7
3 changed files with 2 additions and 9 deletions

View File

@@ -73,8 +73,7 @@ func (b Builder) Panic(v Expr) {
if debugInstr {
log.Printf("Panic %v\n", v.impl)
}
pkg := b.fn.pkg
b.Call(pkg.rtAbort()) // TODO(xsw): pass v
b.impl.CreateUnreachable() // TODO(xsw): pass v
}
// Return emits a return instruction.