[lld] r272137 - [ELF] - Removed includeInGnuHashTable() function. NFC.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 8 05:57:14 PDT 2016
Author: grimar
Date: Wed Jun 8 07:57:14 2016
New Revision: 272137
URL: http://llvm.org/viewvc/llvm-project?rev=272137&view=rev
Log:
[ELF] - Removed includeInGnuHashTable() function. NFC.
It was one line global static function that looks nicer to inline,
patch do that.
Modified:
lld/trunk/ELF/OutputSections.cpp
Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=272137&r1=272136&r2=272137&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Wed Jun 8 07:57:14 2016
@@ -531,11 +531,6 @@ void GnuHashTableSection<ELFT>::writeHas
Values[I - 1] |= 1;
}
-static bool includeInGnuHashTable(SymbolBody *B) {
- // Assume that includeInDynsym() is already checked.
- return !B->isUndefined();
-}
-
// Add symbols to this symbol hash table. Note that this function
// destructively sort a given vector -- which is needed because
// GNU-style hash table places some sorting requirements.
@@ -544,7 +539,7 @@ void GnuHashTableSection<ELFT>::addSymbo
std::vector<std::pair<SymbolBody *, size_t>> &V) {
auto Mid = std::stable_partition(V.begin(), V.end(),
[](std::pair<SymbolBody *, size_t> &P) {
- return !includeInGnuHashTable(P.first);
+ return P.first->isUndefined();
});
if (Mid == V.end())
return;
More information about the llvm-commits
mailing list