Convert Label.Used to a boolean. Also move the field to the
bottom of the struct to avoid padding.
This change passes go build -toolexec 'toolstash -cmp' -a std.
Change-Id: If09ee92f9d54dce807e7b862cf771005daed810d
Reviewed-on: https://go-review.googlesource.com/14308
Run-TryBot: Dave Cheney <dave@cheney.net>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
break
}
- lab.Used = 1
+ lab.Used = true
if lab.Breakpc == nil {
Yyerror("invalid break label %v", n.Left.Sym)
break
break
}
- lab.Used = 1
+ lab.Used = true
if lab.Continpc == nil {
Yyerror("invalid continue label %v", n.Left.Sym)
break
continue
}
- if lab.Use == nil && lab.Used == 0 {
+ if lab.Use == nil && !lab.Used {
yyerrorl(int(lab.Def.Lineno), "label %v defined and not used", lab.Sym)
continue
}
}
type Label struct {
- Used uint8
Sym *Sym
Def *Node
Use []*Node
Labelpc *obj.Prog // pointer to code
Breakpc *obj.Prog // pointer to code
Continpc *obj.Prog // pointer to code
+
+ Used bool
}
type InitEntry struct {