Silence GCC 9 error about deprecated implicit copy constructor.
authorCary Coutant <ccoutant@gmail.com>
Sat, 23 Jun 2018 01:19:51 +0000 (18:19 -0700)
committerCary Coutant <ccoutant@gmail.com>
Sat, 23 Jun 2018 01:19:51 +0000 (18:19 -0700)
commita1893a821c4a2e953d13b97360b85650f2127134
tree1f388308d04c063ce8ada1ca1be3174cc6e87bbf
parent2e7a29d5701d6b320cddf0b1677116d2fe49587b
Silence GCC 9 error about deprecated implicit copy constructor.

Replacing push_back() with emplace_back() eliminates the calls to the
copy constructor, but I still had to provide explicit copy constructors
because of the call to vector::reserve(), which tries to instantiate them
even though they'll never actually be called when reserve() is called
on an empty vector.

gold/
* incremental.cc (Sized_incremental_binary::setup_readers): Use
emplace_back for GCC 5 and later.
* incremental.h (Incremental_binary::Input_reader): Provide copy
constructor.
(Sized_incremental_binary::Sized_input_reader): Likewise.
gold/ChangeLog
gold/incremental.cc
gold/incremental.h