llgo/ssa: Alloca, ArrayAlloca

This commit is contained in:
xushiwei
2024-04-29 17:58:10 +08:00
parent 7a347d4563
commit 2b82af519c
7 changed files with 84 additions and 1 deletions

13
cl/_testcgo/cstr/in.go Normal file
View File

@@ -0,0 +1,13 @@
package main
import _ "unsafe"
//go:linkname cstr llgo.cstr
func cstr(string) *int8
//go:linkname printf C.printf
func printf(format *int8, __llgo_va_list ...any)
func main() {
printf(cstr("Hello, world\n"))
}