Этот коммит содержится в:
Ayke van Laethem 2018-04-25 19:49:54 +02:00
родитель b4ba90d7f5
коммит 69140c240b

6
tgo.go
Просмотреть файл

@ -848,7 +848,11 @@ func (c *Compiler) parseBinOp(frame *Frame, binop *ssa.BinOp) (llvm.Value, error
if err != nil {
return llvm.Value{}, err
}
signed := binop.X.Type().(*types.Basic).Info() & types.IsUnsigned == 0
typ := binop.X.Type()
if typNamed, ok := typ.(*types.Named); ok {
typ = typNamed.Underlying()
}
signed := typ.(*types.Basic).Info() & types.IsUnsigned == 0
switch binop.Op {
case token.ADD: // +
return c.builder.CreateAdd(x, y, ""), nil