From 2f4aeb2f53d96690953fabab487fd1d922f1c95f Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Mon, 11 May 2020 15:28:55 -0700 Subject: compiler: use const std::string& in a couple of places Use a reference to avoid copying a std::string. Fixes go/94766 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/233320 --- gcc/go/gofrontend/names.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/go/gofrontend/names.cc') diff --git a/gcc/go/gofrontend/names.cc b/gcc/go/gofrontend/names.cc index f4ad1815..a721a36 100644 --- a/gcc/go/gofrontend/names.cc +++ b/gcc/go/gofrontend/names.cc @@ -1024,7 +1024,7 @@ Gogo::type_descriptor_name(const Type* type, Named_type* nt) // Return the name of the type descriptor list symbol of a package. std::string -Gogo::type_descriptor_list_symbol(std::string pkgpath) +Gogo::type_descriptor_list_symbol(const std::string& pkgpath) { return pkgpath + "..types"; } -- cgit v1.1