Commit 42aa608f authored by Robert Griesemer's avatar Robert Griesemer

cmd/compile: remove confusing comment, fix comment for symExport

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/39033Reviewed-by: default avatarDave Cheney <dave@cheney.net>
parent 673a8fdf
......@@ -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)
}
......
......@@ -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
......
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