cvtCType bugfix
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user