]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: clarify the difference between types.Sym and obj.LSym
authorLE Manh Cuong <cuong.manhle.vn@gmail.com>
Fri, 3 May 2019 17:24:53 +0000 (00:24 +0700)
committerKeith Randall <khr@golang.org>
Tue, 21 May 2019 03:03:01 +0000 (03:03 +0000)
commit2d7cb295fdda94f3d62588b7bb01a4d8b445417a
tree995e58f0c16da777a7909a1b5645f6d1a65bfd46
parentab724d43efe7e1a7516c1d13e40b55dca26a61b4
cmd/compile: clarify the difference between types.Sym and obj.LSym

Both types.Sym and obj.LSym have the field Name, and that field is
widely used in compiler source. It can lead to confusion that when to
use which one.

So, adding documentation for clarifying the difference between them,
eliminate the confusion, or at least, make the code which use them
clearer for the reader.

See https://github.com/golang/go/issues/31252#issuecomment-481929174

Change-Id: I31f7fc6e4de4cf68f67ab2e3a385a7f451c796f5
Reviewed-on: https://go-review.googlesource.com/c/go/+/175019
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/syntax.go
src/cmd/compile/internal/types/sym.go
src/cmd/internal/obj/link.go