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

@@ -78,7 +78,7 @@ _llgo_1: ; preds = %_llgo_0
_llgo_2: ; preds = %_llgo_0
%10 = call %"github.com/goplus/llgo/internal/runtime.iface" @"github.com/goplus/llgo/internal/runtime.MakeAnyString"([21 x i8] c"I2Int: type mismatch\00")
call void @abort()
unreachable
}
define %"github.com/goplus/llgo/internal/runtime.iface" @"github.com/goplus/llgo/internal/runtime.MakeAny"(ptr %0, ptr %1) {
@@ -267,6 +267,4 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0
ret void
}
declare void @abort()
declare void @"github.com/goplus/llgo/internal/abi.init"()