diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2024-04-22 15:01:37 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2024-04-23 10:40:12 -0400 |
commit | ff191ddf80a2bcb81e0ef0208a961f98e72fe719 (patch) | |
tree | 8f63655506732f955f055534f9ca507a9122d23d /etc | |
parent | 6a7d971a8a95d35310388959acfa82bc9d63aba6 (diff) | |
download | binutils-ff191ddf80a2bcb81e0ef0208a961f98e72fe719.zip binutils-ff191ddf80a2bcb81e0ef0208a961f98e72fe719.tar.gz binutils-ff191ddf80a2bcb81e0ef0208a961f98e72fe719.tar.bz2 |
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>
Diffstat (limited to 'etc')
0 files changed, 0 insertions, 0 deletions