cgo: supports c/go callback funcs
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
source_filename = "main"
|
||||
|
||||
%main.Foo = type { i32, i1 }
|
||||
%"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr }
|
||||
|
||||
@"github.com/goplus/llgo/internal/runtime.cgoAlwaysFalse" = external global i1, align 1
|
||||
@main.format = global [10 x i8] zeroinitializer, align 1
|
||||
@@ -35,6 +36,15 @@ _llgo_0:
|
||||
ret void
|
||||
}
|
||||
|
||||
define ptr @main._Cgo_ptr(ptr %0) {
|
||||
_llgo_0:
|
||||
ret ptr %0
|
||||
}
|
||||
|
||||
declare void @runtime.cgoUse(%"github.com/goplus/llgo/internal/runtime.eface")
|
||||
|
||||
declare void @runtime.cgoCheckResult(%"github.com/goplus/llgo/internal/runtime.eface")
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
|
||||
Reference in New Issue
Block a user