github.com/goplus/llgo@v0.8.3/cl/_testdata/importpkg/out.ll (about) 1 ; ModuleID = 'main' 2 source_filename = "main" 3 4 @main.hello = global [7 x i8] undef 5 @"main.init$guard" = global ptr null 6 @__llgo_argc = global ptr null 7 @__llgo_argv = global ptr null 8 9 define void @main.init() { 10 _llgo_0: 11 %0 = load i1, ptr @"main.init$guard", align 1 12 br i1 %0, label %_llgo_2, label %_llgo_1 13 14 _llgo_1: ; preds = %_llgo_0 15 store i1 true, ptr @"main.init$guard", align 1 16 call void @"github.com/goplus/llgo/cl/internal/stdio.init"() 17 store i8 72, ptr @main.hello, align 1 18 store i8 101, ptr getelementptr inbounds (i8, ptr @main.hello, i64 1), align 1 19 store i8 108, ptr getelementptr inbounds (i8, ptr @main.hello, i64 2), align 1 20 store i8 108, ptr getelementptr inbounds (i8, ptr @main.hello, i64 3), align 1 21 store i8 111, ptr getelementptr inbounds (i8, ptr @main.hello, i64 4), align 1 22 store i8 10, ptr getelementptr inbounds (i8, ptr @main.hello, i64 5), align 1 23 store i8 0, ptr getelementptr inbounds (i8, ptr @main.hello, i64 6), align 1 24 br label %_llgo_2 25 26 _llgo_2: ; preds = %_llgo_1, %_llgo_0 27 ret void 28 } 29 30 define i32 @main(i32 %0, ptr %1) { 31 _llgo_0: 32 store i32 %0, ptr @__llgo_argc, align 4 33 store ptr %1, ptr @__llgo_argv, align 8 34 call void @"github.com/goplus/llgo/internal/runtime.init"() 35 call void @main.init() 36 %2 = call i64 @"github.com/goplus/llgo/cl/internal/stdio.Max"(i64 2, i64 100) 37 call void (ptr, ...) @printf(ptr @main.hello) 38 ret i32 0 39 } 40 41 declare void @"github.com/goplus/llgo/cl/internal/stdio.init"() 42 43 declare void @"github.com/goplus/llgo/internal/runtime.init"() 44 45 declare i64 @"github.com/goplus/llgo/cl/internal/stdio.Max"(i64, i64) 46 47 declare void @printf(ptr, ...)