mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 20:23:39 +08:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user