Merge pull request #504 from xushiwei/q

c.AllocaCStrs; ssa: AllocaU/ArrayAlloca/Times/AllocaCStrs; cl/_testlibc: allocacstrs; demo: sysexec
This commit is contained in:
xushiwei
2024-07-13 12:51:33 +08:00
committed by GitHub
14 changed files with 304 additions and 71 deletions

3
c/c.go
View File

@@ -68,6 +68,9 @@ func Alloca(size uintptr) Pointer
//go:linkname AllocaCStr llgo.allocaCStr
func AllocaCStr(s string) *Char
//go:linkname AllocaCStrs llgo.allocaCStrs
func AllocaCStrs(strs []string, endWithNil bool) **Char
// TODO(xsw):
// llgo:link AllocaNew llgo.allocaNew
func AllocaNew[T any]() *T { return nil }