llgo/ssa: vkFuncDecl/vkFuncPtr/vkClosure

This commit is contained in:
xushiwei
2024-05-03 15:40:24 +08:00
parent 85da86a4f1
commit afd3d40348
5 changed files with 95 additions and 24 deletions

View File

@@ -979,7 +979,7 @@ func (b Builder) BuiltinCall(fn string, args ...Expr) (ret Expr) {
case *types.Slice:
return b.InlineCall(b.fn.pkg.rtFunc("SliceLen"), arg)
case *types.Basic:
if t.Info()&types.IsString != 0 {
if t.Kind() == types.String {
return b.InlineCall(b.fn.pkg.rtFunc("StringLen"), arg)
}
}