[lld] r307690 - Delete redundant InVersionScript field.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 11 11:59:45 PDT 2017
Author: rafael
Date: Tue Jul 11 11:59:45 2017
New Revision: 307690
URL: http://llvm.org/viewvc/llvm-project?rev=307690&view=rev
Log:
Delete redundant InVersionScript field.
Thanks to Rui for the suggestion.
Modified:
lld/trunk/ELF/SymbolTable.cpp
lld/trunk/ELF/Symbols.h
Modified: lld/trunk/ELF/SymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.cpp?rev=307690&r1=307689&r2=307690&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.cpp (original)
+++ lld/trunk/ELF/SymbolTable.cpp Tue Jul 11 11:59:45 2017
@@ -231,7 +231,6 @@ std::pair<Symbol *, bool> SymbolTable<EL
Symbol *Sym;
if (IsNew) {
Sym = make<Symbol>();
- Sym->InVersionScript = false;
Sym->Binding = STB_WEAK;
Sym->Visibility = STV_DEFAULT;
Sym->IsUsedInRegularObj = false;
@@ -697,10 +696,9 @@ void SymbolTable<ELFT>::assignExactVersi
// Assign the version.
for (SymbolBody *B : Syms) {
Symbol *Sym = B->symbol();
- if (Sym->InVersionScript)
+ if (Sym->VersionId != Config->DefaultSymbolVersion)
warn("duplicate symbol '" + Ver.Name + "' in version script");
Sym->VersionId = VersionId;
- Sym->InVersionScript = true;
}
}
Modified: lld/trunk/ELF/Symbols.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.h?rev=307690&r1=307689&r2=307690&view=diff
==============================================================================
--- lld/trunk/ELF/Symbols.h (original)
+++ lld/trunk/ELF/Symbols.h Tue Jul 11 11:59:45 2017
@@ -363,9 +363,6 @@ struct Symbol {
// True if this symbol is specified by --trace-symbol option.
unsigned Traced : 1;
- // This symbol version was found in a version script.
- unsigned InVersionScript : 1;
-
bool includeInDynsym() const;
uint8_t computeBinding() const;
bool isWeak() const { return Binding == llvm::ELF::STB_WEAK; }
More information about the llvm-commits
mailing list