github.com/goplus/llgo@v0.8.3/cl/_testrt/any/out.ll (about) 1 ; ModuleID = 'main' 2 source_filename = "main" 3 4 %"github.com/goplus/llgo/internal/runtime.iface" = type { ptr, ptr } 5 6 @"main.init$guard" = global ptr null 7 @__llgo_argc = global ptr null 8 @__llgo_argv = global ptr null 9 @0 = private unnamed_addr constant [10 x i8] c"Hello %d\0A\00", align 1 10 11 define i64 @main.incVal(%"github.com/goplus/llgo/internal/runtime.iface" %0) { 12 _llgo_0: 13 %1 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 2) 14 %2 = call i64 @"github.com/goplus/llgo/internal/runtime.I2Int"(%"github.com/goplus/llgo/internal/runtime.iface" %0, ptr %1) 15 %3 = add i64 %2, 1 16 ret i64 %3 17 } 18 19 define void @main.init() { 20 _llgo_0: 21 %0 = load i1, ptr @"main.init$guard", align 1 22 br i1 %0, label %_llgo_2, label %_llgo_1 23 24 _llgo_1: ; preds = %_llgo_0 25 store i1 true, ptr @"main.init$guard", align 1 26 br label %_llgo_2 27 28 _llgo_2: ; preds = %_llgo_1, %_llgo_0 29 ret void 30 } 31 32 define i32 @main(i32 %0, ptr %1) { 33 _llgo_0: 34 store i32 %0, ptr @__llgo_argc, align 4 35 store ptr %1, ptr @__llgo_argv, align 8 36 call void @"github.com/goplus/llgo/internal/runtime.init"() 37 call void @main.init() 38 %2 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 2) 39 %3 = call %"github.com/goplus/llgo/internal/runtime.iface" @"github.com/goplus/llgo/internal/runtime.MakeAnyInt"(ptr %2, i64 100) 40 %4 = call i64 @main.incVal(%"github.com/goplus/llgo/internal/runtime.iface" %3) 41 %5 = call i32 (ptr, ...) @printf(ptr @0, i64 %4) 42 ret i32 0 43 } 44 45 declare i64 @"github.com/goplus/llgo/internal/runtime.I2Int"(%"github.com/goplus/llgo/internal/runtime.iface", ptr) 46 47 declare ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64) 48 49 declare void @"github.com/goplus/llgo/internal/runtime.init"() 50 51 declare %"github.com/goplus/llgo/internal/runtime.iface" @"github.com/goplus/llgo/internal/runtime.MakeAnyInt"(ptr, i64) 52 53 declare i32 @printf(ptr, ...)