[PATCH] D12605: [ELF2] Don't allocate more SymbolBodies than needed.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 3 13:27:10 PDT 2015
This revision was automatically updated to reflect the committed changes.
Closed by commit rL246802: [ELF2] Don't allocate more SymbolBodies than needed. (authored by davide).
Changed prior to commit:
http://reviews.llvm.org/D12605?vs=33966&id=33970#toc
Repository:
rL LLVM
http://reviews.llvm.org/D12605
Files:
lld/trunk/ELF/InputFiles.cpp
Index: lld/trunk/ELF/InputFiles.cpp
===================================================================
--- lld/trunk/ELF/InputFiles.cpp
+++ lld/trunk/ELF/InputFiles.cpp
@@ -110,7 +110,7 @@
if (FirstNonLocal > NumSymbols)
error("Invalid sh_info in symbol table");
Syms = llvm::make_range(Syms.begin() + FirstNonLocal, Syms.end());
- SymbolBodies.reserve(NumSymbols);
+ SymbolBodies.reserve(NumSymbols - FirstNonLocal);
for (const Elf_Sym &Sym : Syms)
SymbolBodies.push_back(createSymbolBody(StringTable, &Sym));
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12605.33970.patch
Type: text/x-patch
Size: 536 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150903/661fc2c8/attachment.bin>
More information about the llvm-commits
mailing list