Go patch committed: Don't use pkgpath for fieldtrack of unexported field

Message ID CAOyqgcUVnYZcyZ_SkE0b2=VxDOoCg-C0U3D0H83aoBOBfPJGRA@mail.gmail.com
State New
Headers show
Series
  • Go patch committed: Don't use pkgpath for fieldtrack of unexported field
Related show

Commit Message

Ian Lance Taylor Aug. 21, 2019, 5:19 p.m.
This patch to the Go frontend fixes it to not use the full package
path for the fieldtrack information generated for an unexported field.
Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.  Committed
to mainline.

Ian

Patch

Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE	(revision 274800)
+++ gcc/go/gofrontend/MERGE	(working copy)
@@ -1,4 +1,4 @@ 
-7da359f4659fffff051c05ff442037cfa61febd5
+82d27f0f140f33406cf59c0fb262f6dba3077f8e
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: gcc/go/gofrontend/expressions.cc
===================================================================
--- gcc/go/gofrontend/expressions.cc	(revision 274800)
+++ gcc/go/gofrontend/expressions.cc	(working copy)
@@ -13795,7 +13795,7 @@  Field_reference_expression::do_lower(Gog
   if (nt != NULL)
     s.append(Gogo::unpack_hidden_name(nt->name()));
   s.push_back('.');
-  s.append(field->field_name());
+  s.append(Gogo::unpack_hidden_name(field->field_name()));
   s.push_back('"');
 
   // We can't use a string here, because internally a string holds a