DwarfAccelTable: We know how many hashes we have in the output, just reserve the precise number

llvm-svn: 230865
This commit is contained in:
Benjamin Kramer 2015-02-28 20:15:00 +00:00
parent 48ea372d90
commit 49a1132976
1 changed files with 1 additions and 0 deletions

View File

@ -70,6 +70,7 @@ static bool compareDIEs(const DwarfAccelTable::HashDataContents *A,
void DwarfAccelTable::FinalizeTable(AsmPrinter *Asm, StringRef Prefix) {
// Create the individual hash data outputs.
Data.reserve(Entries.size());
for (StringMap<DataArray>::iterator EI = Entries.begin(), EE = Entries.end();
EI != EE; ++EI) {