mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-03 10:37:46 +00:00
Simplify some code
This commit is contained in:
+2
-8
@@ -1011,10 +1011,7 @@ func (c *Compiler) parseBuiltin(frame *Frame, args []ssa.Value, callName string)
|
||||
if err != nil {
|
||||
return llvm.Value{}, err
|
||||
}
|
||||
typ := arg.Type()
|
||||
if _, ok := typ.(*types.Named); ok {
|
||||
typ = typ.Underlying()
|
||||
}
|
||||
typ := arg.Type().Underlying()
|
||||
switch typ := typ.(type) {
|
||||
case *types.Basic:
|
||||
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) {
|
||||
typ := expr.Type()
|
||||
if named, ok := typ.(*types.Named); ok {
|
||||
typ = named.Underlying()
|
||||
}
|
||||
typ := expr.Type().Underlying()
|
||||
switch typ := typ.(type) {
|
||||
case *types.Basic:
|
||||
llvmType, err := c.getLLVMType(typ)
|
||||
|
||||
Reference in New Issue
Block a user