From ad74c1cfdf31b5cfc7e73b65ab174c59fbfbf0ad Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 18 Oct 2016 15:31:23 +0000 Subject: [PATCH] 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 --- lld/ELF/InputSection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp index be91b27c9250..245c5e9cc901 100644 --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -691,7 +691,7 @@ typename ELFT::uint MergeInputSection::getOffset(uintX_t Offset) const { // Create a map from input offsets to output offsets for all section pieces. // It is called after finalize(). template void MergeInputSection::finalizePieces() { - OffsetMap.grow(this->Pieces.size()); + OffsetMap.reserve(this->Pieces.size()); for (SectionPiece &Piece : this->Pieces) { if (!Piece.Live) continue;