diff --git a/cl/_testrt/gblarray/out.ll b/cl/_testrt/gblarray/out.ll index c03b7420..ab730de7 100644 --- a/cl/_testrt/gblarray/out.ll +++ b/cl/_testrt/gblarray/out.ll @@ -1,7 +1,8 @@ ; ModuleID = 'main' source_filename = "main" -%"github.com/goplus/llgo/internal/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, ptr, ptr, i32, i32 } +%"github.com/goplus/llgo/internal/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, %"github.com/goplus/llgo/internal/runtime.Closure", ptr, i32, i32 } +%"github.com/goplus/llgo/internal/runtime.Closure" = type { ptr, ptr } @main.basicTypes = global ptr null @"main.init$guard" = global ptr null diff --git a/ssa/type_c.go b/ssa/type_c.go index e4d982f5..ff217cb3 100644 --- a/ssa/type_c.go +++ b/ssa/type_c.go @@ -16,7 +16,9 @@ package ssa -import "go/types" +import ( + "go/types" +) // ----------------------------------------------------------------------------- @@ -72,6 +74,10 @@ func cvtCType(typ types.Type) (types.Type, bool) { } case *types.Struct: return cvtCStruct(t) + case *types.Named: + if _, cvt := cvtCType(t.Underlying()); cvt { + panic("todo: named type") + } case *types.Signature: t = CFuncDecl(t) return (*CFuncPtr)(t), true