[lld] r290321 - Simplify. NFC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 21 21:22:29 PST 2016
Author: ruiu
Date: Wed Dec 21 23:22:29 2016
New Revision: 290321
URL: http://llvm.org/viewvc/llvm-project?rev=290321&view=rev
Log:
Simplify. NFC.
Modified:
lld/trunk/ELF/SymbolTable.cpp
Modified: lld/trunk/ELF/SymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.cpp?rev=290321&r1=290320&r2=290321&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.cpp (original)
+++ lld/trunk/ELF/SymbolTable.cpp Wed Dec 21 23:22:29 2016
@@ -574,14 +574,9 @@ template <class ELFT>
std::vector<SymbolBody *> SymbolTable<ELFT>::findByVersion(SymbolVersion Ver) {
if (Ver.IsExternCpp) {
initDemangledSyms();
- auto I = DemangledSyms->find(Ver.Name);
- if (I != DemangledSyms->end())
- return I->second;
- return {};
+ return DemangledSyms->lookup(Ver.Name);
}
- std::vector<SymbolBody *> Syms;
- Syms.push_back(find(Ver.Name));
- return Syms;
+ return {find(Ver.Name)};
}
template <class ELFT>
More information about the llvm-commits
mailing list