From f399dd34986cea64c2cf64bc173cffb587e16291 Mon Sep 17 00:00:00 2001 From: xushiwei Date: Fri, 24 May 2024 09:46:29 +0800 Subject: [PATCH] TestAny --- cl/_testgo/strucintf/in.go | 2 +- cl/_testgo/strucintf/out.ll | 12 ++++++------ ssa/ssa_test.go | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cl/_testgo/strucintf/in.go b/cl/_testgo/strucintf/in.go index c2822448..ba17fc6b 100644 --- a/cl/_testgo/strucintf/in.go +++ b/cl/_testgo/strucintf/in.go @@ -1,8 +1,8 @@ package main import ( - "github.com/goplus/llgo/_demo/interf/foo" "github.com/goplus/llgo/c" + "github.com/goplus/llgo/cl/internal/foo" ) func main() { diff --git a/cl/_testgo/strucintf/out.ll b/cl/_testgo/strucintf/out.ll index c042d4ac..080533a6 100644 --- a/cl/_testgo/strucintf/out.ll +++ b/cl/_testgo/strucintf/out.ll @@ -30,7 +30,7 @@ _llgo_0: _llgo_1: ; preds = %_llgo_0 store i1 true, ptr @"main.init$guard", align 1 - call void @"github.com/goplus/llgo/_demo/interf/foo.init"() + call void @"github.com/goplus/llgo/cl/internal/foo.init"() call void @"main.init$abi"() br label %_llgo_2 @@ -46,7 +46,7 @@ _llgo_0: call void @main.init() %2 = alloca { i64 }, align 8 %3 = call ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr %2, i64 8) - %4 = call %"github.com/goplus/llgo/internal/runtime.eface" @"github.com/goplus/llgo/_demo/interf/foo.Bar"() + %4 = call %"github.com/goplus/llgo/internal/runtime.eface" @"github.com/goplus/llgo/cl/internal/foo.Bar"() %5 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %4, 0 %6 = load ptr, ptr @"_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk", align 8 %7 = icmp eq ptr %5, %6 @@ -83,7 +83,7 @@ _llgo_1: ; preds = %_llgo_0 _llgo_2: ; preds = %_llgo_3, %_llgo_1 %27 = alloca { i64 }, align 8 %28 = call ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr %27, i64 8) - %29 = call %"github.com/goplus/llgo/internal/runtime.eface" @"github.com/goplus/llgo/_demo/interf/foo.F"() + %29 = call %"github.com/goplus/llgo/internal/runtime.eface" @"github.com/goplus/llgo/cl/internal/foo.F"() %30 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %29, 0 %31 = load ptr, ptr @"main.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8 %32 = icmp eq ptr %30, %31 @@ -129,17 +129,17 @@ _llgo_6: ; preds = %_llgo_2 br label %_llgo_5 } -declare void @"github.com/goplus/llgo/_demo/interf/foo.init"() +declare void @"github.com/goplus/llgo/cl/internal/foo.init"() declare void @"github.com/goplus/llgo/internal/runtime.init"() declare ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr, i64) -declare %"github.com/goplus/llgo/internal/runtime.eface" @"github.com/goplus/llgo/_demo/interf/foo.Bar"() +declare %"github.com/goplus/llgo/internal/runtime.eface" @"github.com/goplus/llgo/cl/internal/foo.Bar"() declare i32 @printf(ptr, ...) -declare %"github.com/goplus/llgo/internal/runtime.eface" @"github.com/goplus/llgo/_demo/interf/foo.F"() +declare %"github.com/goplus/llgo/internal/runtime.eface" @"github.com/goplus/llgo/cl/internal/foo.F"() define void @"main.init$abi"() { _llgo_0: diff --git a/ssa/ssa_test.go b/ssa/ssa_test.go index cd686c7b..3e23e756 100644 --- a/ssa/ssa_test.go +++ b/ssa/ssa_test.go @@ -130,7 +130,7 @@ func TestAny(t *testing.T) { prog.SetRuntime(func() *types.Package { ret := types.NewPackage("runtime", "runtime") scope := ret.Scope() - name := types.NewTypeName(0, ret, "Interface", nil) + name := types.NewTypeName(0, ret, "Eface", nil) types.NewNamed(name, types.NewStruct(nil, nil), nil) scope.Insert(name) return ret