Commit d57a118a authored by Matthew Dempsky's avatar Matthew Dempsky

cmd/compile: remove dead flags

For some time now, the -d flag has been used to control various named
debug options, rather than setting Debug['d']. Consequently, that
means dflag() always returns false, which means the -y flag is also
useless.

Similarly, Debug['L'] is never used anywhere, so the -L flag can be
dropped too.

Change-Id: I4bb12454e462410115ec4f5565facf76c5c2f255
Reviewed-on: https://go-review.googlesource.com/22121Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 75c079cb
......@@ -13,19 +13,6 @@ import (
// Declaration stack & operations
func dflag() bool {
if Debug['d'] == 0 {
return false
}
if Debug['y'] != 0 {
return true
}
if incannedimport != 0 {
return false
}
return true
}
var externdcl []*Node
var blockgen int32 // max block number
......@@ -67,9 +54,6 @@ func push() *Sym {
func pushdcl(s *Sym) *Sym {
d := push()
dcopy(d, s)
if dflag() {
fmt.Printf("\t%v push %v %p\n", linestr(lineno), s, s.Def)
}
return d
}
......@@ -82,9 +66,6 @@ func popdcl() {
lno := s.Lastlineno
dcopy(s, d)
d.Lastlineno = lno
if dflag() {
fmt.Printf("\t%v pop %v %p\n", linestr(lineno), s, s.Def)
}
}
if d == nil {
......@@ -194,9 +175,6 @@ func declare(n *Node, ctxt Class) {
gen := 0
if ctxt == PEXTERN {
externdcl = append(externdcl, n)
if dflag() {
fmt.Printf("\t%v global decl %v %p\n", linestr(lineno), s, n)
}
} else {
if Curfn == nil && ctxt == PAUTO {
Fatalf("automatic outside function")
......
......@@ -153,7 +153,6 @@ func Main() {
obj.Flagcount("E", "debug symbol export", &Debug['E'])
obj.Flagfn1("I", "add `directory` to import search path", addidir)
obj.Flagcount("K", "debug missing line numbers", &Debug['K'])
obj.Flagcount("L", "use full (long) path in error messages", &Debug['L'])
obj.Flagcount("M", "debug move generation", &Debug['M'])
obj.Flagcount("N", "disable optimizations", &Debug['N'])
obj.Flagcount("P", "debug peephole optimizer", &Debug['P'])
......@@ -191,7 +190,6 @@ func Main() {
obj.Flagcount("w", "debug type checking", &Debug['w'])
flag.BoolVar(&use_writebarrier, "wb", true, "enable write barrier")
obj.Flagcount("x", "debug lexer", &Debug['x'])
obj.Flagcount("y", "debug declarations in canned imports (with -d)", &Debug['y'])
var flag_shared bool
var flag_dynlink bool
if supportsDynlink(Thearch.LinkArch.Arch) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment