[ELF] Use SmallVector for MergeInputSection::pieces. NFC

sizeof(pieces) decreases from 24 to 16 on ELF64.
One BumpPtrAllocator can store more MergeInputSections.
The lld executable becomes smaller.
This commit is contained in:
Fangrui Song 2021-12-16 21:07:39 -08:00
parent 93558e575e
commit bf4fa3036a

View File

@ -278,7 +278,7 @@ public:
// Splittable sections are handled as a sequence of data
// rather than a single large blob of data.
std::vector<SectionPiece> pieces;
SmallVector<SectionPiece, 0> pieces;
// Returns I'th piece's data. This function is very hot when
// string merging is enabled, so we want to inline.