projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d080746
)
Use reserve instead of grow.
author
Rafael Espindola
<rafael.espindola@gmail.com>
Tue, 18 Oct 2016 15:31:23 +0000
(15:31 +0000)
committer
Rafael Espindola
<rafael.espindola@gmail.com>
Tue, 18 Oct 2016 15:31:23 +0000
(15:31 +0000)
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
patch
|
blob
|
history
diff --git
a/lld/ELF/InputSection.cpp
b/lld/ELF/InputSection.cpp
index
be91b27
..
245c5e9
100644
(file)
--- a/
lld/ELF/InputSection.cpp
+++ b/
lld/ELF/InputSection.cpp
@@
-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;