]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: pass struct field note information along in exported info
authorKeith Randall <khr@golang.org>
Tue, 20 Apr 2021 21:29:53 +0000 (14:29 -0700)
committerKeith Randall <khr@golang.org>
Tue, 20 Apr 2021 22:39:22 +0000 (22:39 +0000)
This is needed to make field tracking work correctly.

Change-Id: I0c3452a48d6f36862f6ee8aacc001813866c0ad4
Reviewed-on: https://go-review.googlesource.com/c/go/+/312069
Trust: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>

src/cmd/compile/internal/typecheck/iexport.go
src/cmd/compile/internal/typecheck/iimport.go

index 911d758083708228ceb0effed10a2154612d47bc..b59a610cf79e4a31d0fec7df8e77f08298d9a363 100644 (file)
@@ -749,6 +749,7 @@ func (w *exportWriter) exoticParam(f *types.Field) {
        w.uint64(uint64(f.Offset))
        w.exoticType(f.Type)
        w.bool(f.IsDDD())
+       w.string(f.Note)
 }
 func (w *exportWriter) exoticSym(s *types.Sym) {
        if s == nil {
index c55e3fbe2a0c61d1158823cf7da1740102820c0f..53576bf725d83b0c2439f886d08c10da6e5b4336 100644 (file)
@@ -592,6 +592,7 @@ func (r *importReader) exoticParam() *types.Field {
                f.Nname = ir.NewNameAt(pos, sym)
        }
        f.SetIsDDD(ddd)
+       f.Note = r.string()
        return f
 }