compiler: don't export function type parameter names

When hashing a function type the parameter names are ignored.
Therefore, we should not write them into the export data.
Otherwise, minor changes in the order in which we process the
types can cause the export data to change uselessly, leading to
unnecessary rebuilds.

Change-Id: If3c79474f1ace8a31ee468aa0ec36c846f784aba
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/262818
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
diff --git a/go/types.cc b/go/types.cc
index e7a742f..eb9c766 100644
--- a/go/types.cc
+++ b/go/types.cc
@@ -5182,7 +5182,11 @@
 	    first = false;
 	  else
 	    exp->write_c_string(", ");
-	  exp->write_name(p->name());
+	  // The hash for a function type ignores parameter names, so
+	  // we don't want to write them out here.  If we did write
+	  // them out, we could get spurious changes in export data
+	  // when recompiling a package.
+	  exp->write_name("");
 	  exp->write_c_string(" ");
 	  if (!is_varargs || p + 1 != this->parameters_->end())
 	    exp->write_type(p->type());
@@ -5213,7 +5217,7 @@
 		first = false;
 	      else
 		exp->write_c_string(", ");
-	      exp->write_name(p->name());
+	      exp->write_name("");
 	      exp->write_c_string(" ");
 	      exp->write_type(p->type());
 	    }