[gdb/build] Use move capture in gdb_demangle
authorTom de Vries <tdevries@suse.de>
Tue, 8 Aug 2023 22:58:29 +0000 (00:58 +0200)
committerTom de Vries <tdevries@suse.de>
Tue, 8 Aug 2023 22:58:29 +0000 (00:58 +0200)
commit7570a17cbbe647db6260ae2391f92c0509de7924
treee104924c4586d0b4da4deb2a51cd216dff4ec01f
parente3b66187192ce6840df283c00f6395bb0ff15cf5
[gdb/build] Use move capture in gdb_demangle

Use move capture in gdb_demangle when compiling for c++14 or higher, to save a
std::string copy.

Tested on x86_64-linux.

Reported-By: Tom Tromey <tom@tromey.com>
Approved-By: Tom Tromey <tom@tromey.com>
gdb/cp-support.c