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