llgo/ssa,runtime: Slice

This commit is contained in:
xushiwei
2024-04-30 08:23:55 +08:00
parent 91401c4571
commit 0bfc269652
12 changed files with 109 additions and 16 deletions

View File

@@ -7,8 +7,8 @@ import (
)
func main() {
s := c.String("Hi\n")
s := c.Str("Hi\n")
s2 := c.Alloca(4)
c.Memcpy(s2, unsafe.Pointer(s), 4)
c.Printf(c.String("%s"), s2)
c.Printf(c.Str("%s"), s2)
}