binutils-gdb/gdb/dwarf2
Simon Marchi ff191ddf80 gdb/dwarf2/read.c: remove pessimizing std::move
When building with this clang:

    $ c++ --version
    FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)

I see:

    $ gmake
      CXX    dwarf2/read.o
    /home/smarchi/src/binutils-gdb/gdb/dwarf2/read.c:4890:6: error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move]
                                            std::move (thread_storage.release_parent_map ()));
                                            ^
    /home/smarchi/src/binutils-gdb/gdb/dwarf2/read.c:4890:6: note: remove std::move call here
                                            std::move (thread_storage.release_parent_map ()));
                                            ^~~~~~~~~~~                                    ~

The compiler seems right, there is not need to std::move the result of
`release_parent_map ()`, it's already going to be an rvalue.  Remove the
std::move.

The issue isn't FreeBSD-specific, I see it on Linux as well when
building hwith clang, I just noticed it on a FreeBSD build first.

Change-Id: I7aa20a4db56c799f20d838ad08099a01653bba19
Approved-By: Tom Tromey <tom@tromey.com>
2024-04-23 10:40:12 -04:00
..
abbrev-cache.c gdb, gdbserver, gdbsupport: remove includes of early headers 2024-03-26 21:13:22 -04:00
abbrev-cache.h
abbrev.c gdb, gdbserver, gdbsupport: remove includes of early headers 2024-03-26 21:13:22 -04:00
abbrev.h
ada-imported.c gdb, gdbserver, gdbsupport: remove includes of early headers 2024-03-26 21:13:22 -04:00
aranges.c gdb, gdbserver, gdbsupport: remove includes of early headers 2024-03-26 21:13:22 -04:00
aranges.h
attribute.c gdb, gdbserver, gdbsupport: remove includes of early headers 2024-03-26 21:13:22 -04:00
attribute.h
call-site.h
comp-unit-head.c gdb, gdbserver, gdbsupport: remove includes of early headers 2024-03-26 21:13:22 -04:00
comp-unit-head.h
cooked-index.c Correctly handle DIE parent computations 2024-04-16 11:54:46 -06:00
cooked-index.h Correctly handle DIE parent computations 2024-04-16 11:54:46 -06:00
cu.c gdb, gdbserver, gdbsupport: remove includes of early headers 2024-03-26 21:13:22 -04:00
cu.h
die.c gdb, gdbserver, gdbsupport: remove includes of early headers 2024-03-26 21:13:22 -04:00
die.h gdb: don't include hashtab.h in defs.h 2024-04-22 21:34:19 -04:00
dwz.c gdb: ensure has dwarf info before reading DWZ file 2024-04-03 13:47:03 +01:00
dwz.h
expr.c gdb, gdbserver, gdbsupport: remove includes of early headers 2024-03-26 21:13:22 -04:00
expr.h
file-and-dir.h
frame-tailcall.c gdb, gdbserver, gdbsupport: remove includes of early headers 2024-03-26 21:13:22 -04:00
frame-tailcall.h
frame.c gdb, gdbserver, gdbsupport: remove includes of early headers 2024-03-26 21:13:22 -04:00
frame.h
index-cache.c gdb, gdbserver, gdbsupport: remove includes of early headers 2024-03-26 21:13:22 -04:00
index-cache.h
index-common.c gdb, gdbserver, gdbsupport: remove includes of early headers 2024-03-26 21:13:22 -04:00
index-common.h gdb: don't include hashtab.h in defs.h 2024-04-22 21:34:19 -04:00
index-write.c gdb, gdbserver, gdbsupport: remove includes of early headers 2024-03-26 21:13:22 -04:00
index-write.h
leb.c gdb, gdbserver, gdbsupport: remove includes of early headers 2024-03-26 21:13:22 -04:00
leb.h
line-header.c gdb, gdbserver, gdbsupport: remove includes of early headers 2024-03-26 21:13:22 -04:00
line-header.h
loc.c gdb, gdbserver, gdbsupport: remove includes of early headers 2024-03-26 21:13:22 -04:00
loc.h
macro.c gdb, gdbserver, gdbsupport: remove includes of early headers 2024-03-26 21:13:22 -04:00
macro.h
mapped-index.h
parent-map.h Introduce class parent_map for DIE range map 2024-04-16 11:54:46 -06:00
public.h
read-debug-names.c Correctly handle DIE parent computations 2024-04-16 11:54:46 -06:00
read-debug-names.h
read-gdb-index.c gdb, gdbserver, gdbsupport: remove includes of early headers 2024-03-26 21:13:22 -04:00
read-gdb-index.h
read.c gdb/dwarf2/read.c: remove pessimizing std::move 2024-04-23 10:40:12 -04:00
read.h
sect-names.h
section.c gdb, gdbserver, gdbsupport: remove includes of early headers 2024-03-26 21:13:22 -04:00
section.h
stringify.c gdb, gdbserver, gdbsupport: remove includes of early headers 2024-03-26 21:13:22 -04:00
stringify.h
tag.h
types.h gdbsupport: constify some return values in print-utils.{h,cc} 2024-04-18 10:31:54 -04:00