]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: remove confusing comment, fix comment for symExport
authorRobert Griesemer <gri@golang.org>
Thu, 30 Mar 2017 23:40:52 +0000 (16:40 -0700)
committerRobert Griesemer <gri@golang.org>
Fri, 31 Mar 2017 00:54:15 +0000 (00:54 +0000)
The symExport flag tells whether a symbol is in the export list
already or not (and it's also used to avoid being added to that
list). Exporting is based on that export list - no need to check
again.

Change-Id: I6056f97aa5c24a19376957da29199135c8da35f9
Reviewed-on: https://go-review.googlesource.com/39033
Reviewed-by: Dave Cheney <dave@cheney.net>
src/cmd/compile/internal/gc/bexport.go
src/cmd/compile/internal/gc/go.go

index d60b959e370f9356128fb5867b6560832194a7f7..1663555b1251cded5d4e62a16e8c35ede14a7b5e 100644 (file)
@@ -265,11 +265,6 @@ func export(out *bufio.Writer, trace bool) int {
                        Fatalf("exporter: unexpected symbol: %v", sym)
                }
 
-               // TODO(gri) Should we do this check?
-               // if !sym.Export() {
-               //      continue
-               // }
-
                if sym.Def == nil {
                        Fatalf("exporter: unknown export symbol: %v", sym)
                }
@@ -332,11 +327,6 @@ func export(out *bufio.Writer, trace bool) int {
                        Fatalf("exporter: unexpected symbol: %v", sym)
                }
 
-               // TODO(gri) Should we do this check?
-               // if !sym.Export() {
-               //      continue
-               // }
-
                if sym.Def == nil {
                        Fatalf("exporter: unknown export symbol: %v", sym)
                }
index f4ef28376cef1d513c1d0335298953651f3348c9..c98001239edb2f92161cb977a821da3a67094b3b 100644 (file)
@@ -61,7 +61,7 @@ type Sym struct {
 }
 
 const (
-       symExport = 1 << iota // to be exported
+       symExport = 1 << iota // added to exportlist (no need to add again)
        symPackage
        symExported // already written out by export
        symUniq