[lld] r280068 - [ELF] - Use early return. NFC.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 30 02:39:36 PDT 2016
Author: grimar
Date: Tue Aug 30 04:39:36 2016
New Revision: 280068
URL: http://llvm.org/viewvc/llvm-project?rev=280068&view=rev
Log:
[ELF] - Use early return. NFC.
This addresses forgotten review comment for r280067:
"[ELF] - Versionscript: support wildcards for extern "c++" tag."
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=280068&r1=280067&r2=280068&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.cpp (original)
+++ lld/trunk/ELF/SymbolTable.cpp Tue Aug 30 04:39:36 2016
@@ -676,16 +676,17 @@ template <class ELFT> void SymbolTable<E
// Handle wildcards.
for (size_t I = Config->VersionDefinitions.size() - 1; I != (size_t)-1; --I) {
VersionDefinition &V = Config->VersionDefinitions[I];
- for (SymbolVersion &Sym : V.Globals)
- if (hasWildcard(Sym.Name)) {
- std::vector<SymbolBody *> All =
- Sym.IsExternCpp ? findAllDemangled(Demangled, Sym.Name)
- : findAll(Sym.Name);
+ for (SymbolVersion &Sym : V.Globals) {
+ if (!hasWildcard(Sym.Name))
+ continue;
+ std::vector<SymbolBody *> All =
+ Sym.IsExternCpp ? findAllDemangled(Demangled, Sym.Name)
+ : findAll(Sym.Name);
- for (SymbolBody *B : All)
- if (B->symbol()->VersionId == Config->DefaultSymbolVersion)
- B->symbol()->VersionId = V.Id;
- }
+ for (SymbolBody *B : All)
+ if (B->symbol()->VersionId == Config->DefaultSymbolVersion)
+ B->symbol()->VersionId = V.Id;
+ }
}
}
More information about the llvm-commits
mailing list