Этот коммит содержится в:
Ayke van Laethem 2018-08-22 05:14:15 +02:00
родитель 3a6ef38041
коммит d5c7c28135
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: E97FF5335DFDFDED

Просмотреть файл

@ -1011,10 +1011,7 @@ func (c *Compiler) parseBuiltin(frame *Frame, args []ssa.Value, callName string)
if err != nil { if err != nil {
return llvm.Value{}, err return llvm.Value{}, err
} }
typ := arg.Type() typ := arg.Type().Underlying()
if _, ok := typ.(*types.Named); ok {
typ = typ.Underlying()
}
switch typ := typ.(type) { switch typ := typ.(type) {
case *types.Basic: case *types.Basic:
switch typ.Kind() { switch typ.Kind() {
@ -1722,10 +1719,7 @@ func (c *Compiler) parseBinOp(frame *Frame, binop *ssa.BinOp) (llvm.Value, error
} }
func (c *Compiler) parseConst(expr *ssa.Const) (llvm.Value, error) { func (c *Compiler) parseConst(expr *ssa.Const) (llvm.Value, error) {
typ := expr.Type() typ := expr.Type().Underlying()
if named, ok := typ.(*types.Named); ok {
typ = named.Underlying()
}
switch typ := typ.(type) { switch typ := typ.(type) {
case *types.Basic: case *types.Basic:
llvmType, err := c.getLLVMType(typ) llvmType, err := c.getLLVMType(typ)