diff options
author | Cherry Zhang <cherryyz@google.com> | 2019-06-18 23:55:50 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2019-06-18 23:55:50 +0000 |
commit | 864fcf61a00fa1b73ae32be6f1ee11a6f7362b82 (patch) | |
tree | 251712aed0fe7f6df1a7e269149d6854d66555cc /gcc/function.c | |
parent | ed920373a5faece7ea0bfdfebbd615294165c01c (diff) | |
download | gcc-864fcf61a00fa1b73ae32be6f1ee11a6f7362b82.zip gcc-864fcf61a00fa1b73ae32be6f1ee11a6f7362b82.tar.gz gcc-864fcf61a00fa1b73ae32be6f1ee11a6f7362b82.tar.bz2 |
compiler: avoid copy for string([]byte) conversion used in string concatenation
If a string([]byte) conversion is used immediately in a string
concatenation, we don't need to copy the backing store of the
byte slice, as the runtime function doesn't hold any reference
to it.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/182437
* go.dg/concatstring.go: New test.
From-SVN: r272460
Diffstat (limited to 'gcc/function.c')
0 files changed, 0 insertions, 0 deletions