From c7d708e42ed4db9dd323899256d5666c5062e5ab Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Tue, 20 Apr 2021 14:29:53 -0700 Subject: [PATCH] cmd/compile: pass struct field note information along in exported info 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 Run-TryBot: Keith Randall Reviewed-by: Matthew Dempsky TryBot-Result: Go Bot --- src/cmd/compile/internal/typecheck/iexport.go | 1 + src/cmd/compile/internal/typecheck/iimport.go | 1 + 2 files changed, 2 insertions(+) diff --git a/src/cmd/compile/internal/typecheck/iexport.go b/src/cmd/compile/internal/typecheck/iexport.go index 911d758083..b59a610cf7 100644 --- a/src/cmd/compile/internal/typecheck/iexport.go +++ b/src/cmd/compile/internal/typecheck/iexport.go @@ -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 { diff --git a/src/cmd/compile/internal/typecheck/iimport.go b/src/cmd/compile/internal/typecheck/iimport.go index c55e3fbe2a..53576bf725 100644 --- a/src/cmd/compile/internal/typecheck/iimport.go +++ b/src/cmd/compile/internal/typecheck/iimport.go @@ -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 }