github.com/goplus/llgo@v0.8.3/cl/_testrt/panic/out.ll (about)

     1  ; ModuleID = 'main'
     2  source_filename = "main"
     3  
     4  %"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
     5  %"github.com/goplus/llgo/internal/runtime.iface" = type { ptr, ptr }
     6  
     7  @"main.init$guard" = global ptr null
     8  @__llgo_argc = global ptr null
     9  @__llgo_argv = global ptr null
    10  @0 = private unnamed_addr constant [14 x i8] c"panic message\00", align 1
    11  
    12  define void @main.init() {
    13  _llgo_0:
    14    %0 = load i1, ptr @"main.init$guard", align 1
    15    br i1 %0, label %_llgo_2, label %_llgo_1
    16  
    17  _llgo_1:                                          ; preds = %_llgo_0
    18    store i1 true, ptr @"main.init$guard", align 1
    19    br label %_llgo_2
    20  
    21  _llgo_2:                                          ; preds = %_llgo_1, %_llgo_0
    22    ret void
    23  }
    24  
    25  define i32 @main(i32 %0, ptr %1) {
    26  _llgo_0:
    27    store i32 %0, ptr @__llgo_argc, align 4
    28    store ptr %1, ptr @__llgo_argv, align 8
    29    call void @"github.com/goplus/llgo/internal/runtime.init"()
    30    call void @main.init()
    31    %2 = call %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.NewString"(ptr @0, i64 13)
    32    %3 = call %"github.com/goplus/llgo/internal/runtime.iface" @"github.com/goplus/llgo/internal/runtime.MakeAnyString"(%"github.com/goplus/llgo/internal/runtime.String" %2)
    33    call void @"github.com/goplus/llgo/internal/runtime.TracePanic"(%"github.com/goplus/llgo/internal/runtime.iface" %3)
    34    unreachable
    35  }
    36  
    37  declare void @"github.com/goplus/llgo/internal/runtime.init"()
    38  
    39  declare %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.NewString"(ptr, i64)
    40  
    41  declare %"github.com/goplus/llgo/internal/runtime.iface" @"github.com/goplus/llgo/internal/runtime.MakeAnyString"(%"github.com/goplus/llgo/internal/runtime.String")
    42  
    43  declare void @"github.com/goplus/llgo/internal/runtime.TracePanic"(%"github.com/goplus/llgo/internal/runtime.iface")