github.com/goplus/llgo@v0.8.3/cl/_testrt/typalias/out.ll (about) 1 ; ModuleID = 'main' 2 source_filename = "main" 3 4 @main.format = global [10 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.Print(ptr %0) { 10 _llgo_0: 11 %1 = getelementptr inbounds { i32, i1 }, ptr %0, i32 0, i32 1 12 %2 = load i1, ptr %1, align 1 13 br i1 %2, label %_llgo_1, label %_llgo_2 14 15 _llgo_1: ; preds = %_llgo_0 16 %3 = getelementptr inbounds { i32, i1 }, ptr %0, i32 0, i32 0 17 %4 = load i32, ptr %3, align 4 18 call void (ptr, ...) @printf(ptr @main.format, i32 %4) 19 br label %_llgo_2 20 21 _llgo_2: ; preds = %_llgo_1, %_llgo_0 22 ret void 23 } 24 25 define void @main.init() { 26 _llgo_0: 27 %0 = load i1, ptr @"main.init$guard", align 1 28 br i1 %0, label %_llgo_2, label %_llgo_1 29 30 _llgo_1: ; preds = %_llgo_0 31 store i1 true, ptr @"main.init$guard", align 1 32 store i8 72, ptr @main.format, align 1 33 store i8 101, ptr getelementptr inbounds (i8, ptr @main.format, i64 1), align 1 34 store i8 108, ptr getelementptr inbounds (i8, ptr @main.format, i64 2), align 1 35 store i8 108, ptr getelementptr inbounds (i8, ptr @main.format, i64 3), align 1 36 store i8 111, ptr getelementptr inbounds (i8, ptr @main.format, i64 4), align 1 37 store i8 32, ptr getelementptr inbounds (i8, ptr @main.format, i64 5), align 1 38 store i8 37, ptr getelementptr inbounds (i8, ptr @main.format, i64 6), align 1 39 store i8 100, ptr getelementptr inbounds (i8, ptr @main.format, i64 7), align 1 40 store i8 10, ptr getelementptr inbounds (i8, ptr @main.format, i64 8), align 1 41 store i8 0, ptr getelementptr inbounds (i8, ptr @main.format, i64 9), align 1 42 br label %_llgo_2 43 44 _llgo_2: ; preds = %_llgo_1, %_llgo_0 45 ret void 46 } 47 48 define i32 @main(i32 %0, ptr %1) { 49 _llgo_0: 50 store i32 %0, ptr @__llgo_argc, align 4 51 store ptr %1, ptr @__llgo_argv, align 8 52 call void @"github.com/goplus/llgo/internal/runtime.init"() 53 call void @main.init() 54 %2 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 8) 55 %3 = getelementptr inbounds { i32, i1 }, ptr %2, i32 0, i32 0 56 %4 = getelementptr inbounds { i32, i1 }, ptr %2, i32 0, i32 1 57 store i32 100, ptr %3, align 4 58 store i1 true, ptr %4, align 1 59 call void @main.Print(ptr %2) 60 ret i32 0 61 } 62 63 declare void @printf(ptr, ...) 64 65 declare void @"github.com/goplus/llgo/internal/runtime.init"() 66 67 declare ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64)