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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230865 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer 2015-02-28 20:15:00 +00:00
parent cdef9818bc
commit f4cff31d3c

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) {