[lld] r176916 - [ELF][Writer] Let std::vector handle allocating space instead of reserving tiny portions.
Michael J. Spencer
bigcheesegs at gmail.com
Tue Mar 12 17:30:08 PDT 2013
Author: mspencer
Date: Tue Mar 12 19:30:08 2013
New Revision: 176916
URL: http://llvm.org/viewvc/llvm-project?rev=176916&view=rev
Log:
[ELF][Writer] Let std::vector handle allocating space instead of reserving tiny portions.
Modified:
lld/trunk/lib/ReaderWriter/ELF/File.h
Modified: lld/trunk/lib/ReaderWriter/ELF/File.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/File.h?rev=176916&r1=176915&r2=176916&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/File.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/File.h Tue Mar 12 19:30:08 2013
@@ -575,12 +575,6 @@ private:
// Add Rela (those with r_addend) references:
auto rari = _relocationAddendRefences.find(sectionName);
auto rri = _relocationReferences.find(sectionName);
- unsigned refs = 0;
- if (rari != _relocationAddendRefences.end())
- refs += rari->second.size();
- if (rri != _relocationReferences.end())
- refs += rri->second.size();
- _references.reserve(_references.size() + refs);
if (rari != _relocationAddendRefences.end())
for (auto &rai : rari->second) {
if (!((rai->r_offset >= symbol->st_value) &&
More information about the llvm-commits
mailing list