cgo: supports c/go callback funcs

This commit is contained in:
Li Jie
2024-11-26 22:34:19 +08:00
parent 5380ffa471
commit 90763de93c
12 changed files with 162 additions and 84 deletions

View File

@@ -117,6 +117,10 @@ func (g Global) InitNil() {
g.impl.SetInitializer(llvm.ConstNull(g.impl.GlobalValueType()))
}
func (g Global) ReplaceAllUsesWith(v Expr) {
g.impl.ReplaceAllUsesWith(v.impl)
}
// -----------------------------------------------------------------------------
// Function represents the parameters, results, and code of a function