diff options
author | Ian Lance Taylor <iant@golang.org> | 2020-05-11 15:28:55 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2020-05-11 16:11:04 -0700 |
commit | 2f4aeb2f53d96690953fabab487fd1d922f1c95f (patch) | |
tree | 8ce789729e84cc5711d426540c10e047cda5da28 /gcc/go/gofrontend/names.cc | |
parent | 89ce32902a674598e969a7b30980537ee23079b7 (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/names.cc')
-rw-r--r-- | gcc/go/gofrontend/names.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/names.cc b/gcc/go/gofrontend/names.cc index f4ad181515b..a721a364212 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"; } |