summaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend/gogo.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2020-05-11 15:28:55 -0700
committerIan Lance Taylor <iant@golang.org>2020-05-11 16:11:04 -0700
commit2f4aeb2f53d96690953fabab487fd1d922f1c95f (patch)
tree8ce789729e84cc5711d426540c10e047cda5da28 /gcc/go/gofrontend/gogo.h
parent89ce32902a674598e969a7b30980537ee23079b7 (diff)
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
Diffstat (limited to 'gcc/go/gofrontend/gogo.h')
-rw-r--r--gcc/go/gofrontend/gogo.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/go/gofrontend/gogo.h b/gcc/go/gofrontend/gogo.h
index 7d83119b698..2fb8a3aeb43 100644
--- a/gcc/go/gofrontend/gogo.h
+++ b/gcc/go/gofrontend/gogo.h
@@ -958,7 +958,7 @@ class Gogo
// Return the name of the type descriptor list symbol of a package.
std::string
- type_descriptor_list_symbol(std::string);
+ type_descriptor_list_symbol(const std::string&);
// Return the name of the list of all type descriptor lists.
std::string
@@ -1073,7 +1073,7 @@ class Gogo
Specific_type_function(Type* atype, Named_type* aname, int64_t asize,
Specific_type_function_kind akind,
- const std::string afnname,
+ const std::string& afnname,
Function_type* afntype)
: type(atype), name(aname), size(asize), kind(akind),
fnname(afnname), fntype(afntype)