|
| 1 | +; ModuleID = 'github.com/goplus/llgo/cl/_testdata/embedunexport' |
| 2 | +source_filename = "github.com/goplus/llgo/cl/_testdata/embedunexport" |
| 3 | + |
| 4 | +%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } |
| 5 | +%"github.com/goplus/llgo/cl/_testdata/embedunexport.Base" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String" } |
| 6 | +%"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr } |
| 7 | + |
| 8 | +@"github.com/goplus/llgo/cl/_testdata/embedunexport.init$guard" = global i1 false, align 1 |
| 9 | +@0 = private unnamed_addr constant [8 x i8] c"modified", align 1 |
| 10 | + |
| 11 | +define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/cl/_testdata/embedunexport.(*Base).Name"(ptr %0) { |
| 12 | +_llgo_0: |
| 13 | + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testdata/embedunexport.Base", ptr %0, i32 0, i32 0 |
| 14 | + %2 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %1, align 8 |
| 15 | + ret %"github.com/goplus/llgo/runtime/internal/runtime.String" %2 |
| 16 | +} |
| 17 | + |
| 18 | +define void @"github.com/goplus/llgo/cl/_testdata/embedunexport.(*Base).setName"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.String" %1) { |
| 19 | +_llgo_0: |
| 20 | + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testdata/embedunexport.Base", ptr %0, i32 0, i32 0 |
| 21 | + store %"github.com/goplus/llgo/runtime/internal/runtime.String" %1, ptr %2, align 8 |
| 22 | + ret void |
| 23 | +} |
| 24 | + |
| 25 | +define ptr @"github.com/goplus/llgo/cl/_testdata/embedunexport.NewBase"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0) { |
| 26 | +_llgo_0: |
| 27 | + %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16) |
| 28 | + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testdata/embedunexport.Base", ptr %1, i32 0, i32 0 |
| 29 | + store %"github.com/goplus/llgo/runtime/internal/runtime.String" %0, ptr %2, align 8 |
| 30 | + ret ptr %1 |
| 31 | +} |
| 32 | + |
| 33 | +define void @"github.com/goplus/llgo/cl/_testdata/embedunexport.Use"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0) { |
| 34 | +_llgo_0: |
| 35 | + %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0) |
| 36 | + %2 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %0, 0 |
| 37 | + %3 = getelementptr ptr, ptr %2, i64 4 |
| 38 | + %4 = load ptr, ptr %3, align 8 |
| 39 | + %5 = insertvalue { ptr, ptr } undef, ptr %4, 0 |
| 40 | + %6 = insertvalue { ptr, ptr } %5, ptr %1, 1 |
| 41 | + %7 = extractvalue { ptr, ptr } %6, 1 |
| 42 | + %8 = extractvalue { ptr, ptr } %6, 0 |
| 43 | + call void %8(ptr %7, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 8 }) |
| 44 | + ret void |
| 45 | +} |
| 46 | + |
| 47 | +define void @"github.com/goplus/llgo/cl/_testdata/embedunexport.init"() { |
| 48 | +_llgo_0: |
| 49 | + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testdata/embedunexport.init$guard", align 1 |
| 50 | + br i1 %0, label %_llgo_2, label %_llgo_1 |
| 51 | + |
| 52 | +_llgo_1: ; preds = %_llgo_0 |
| 53 | + store i1 true, ptr @"github.com/goplus/llgo/cl/_testdata/embedunexport.init$guard", align 1 |
| 54 | + br label %_llgo_2 |
| 55 | + |
| 56 | +_llgo_2: ; preds = %_llgo_1, %_llgo_0 |
| 57 | + ret void |
| 58 | +} |
| 59 | + |
| 60 | +declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64) |
| 61 | + |
| 62 | +declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface") |
0 commit comments