Use reserve instead of grow.

The table was still being resized as grow doesn't account for the fact
that the table needs to remain 3/4 full.

llvm-svn: 284487
This commit is contained in:
Rafael Espindola
2016-10-18 15:31:23 +00:00
parent d080746c19
commit ad74c1cfdf

View File

@@ -691,7 +691,7 @@ typename ELFT::uint MergeInputSection<ELFT>::getOffset(uintX_t Offset) const {
// Create a map from input offsets to output offsets for all section pieces.
// It is called after finalize().
template <class ELFT> void MergeInputSection<ELFT>::finalizePieces() {
OffsetMap.grow(this->Pieces.size());
OffsetMap.reserve(this->Pieces.size());
for (SectionPiece &Piece : this->Pieces) {
if (!Piece.Live)
continue;