[lld] r326641 - Simplify. NFC.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 2 18:13:50 PST 2018
Author: rafael
Date: Fri Mar 2 18:13:50 2018
New Revision: 326641
URL: http://llvm.org/viewvc/llvm-project?rev=326641&view=rev
Log:
Simplify. NFC.
Since r321982 we don't set VersionId in scanShlibUndefined, which
makes InVersionScript redundant.
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=326641&r1=326640&r2=326641&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.cpp (original)
+++ lld/trunk/ELF/SymbolTable.cpp Fri Mar 2 18:13:50 2018
@@ -235,7 +235,6 @@ std::pair<Symbol *, bool> SymbolTable::i
Symbol *Sym;
if (IsNew) {
Sym = reinterpret_cast<Symbol *>(make<SymbolUnion>());
- Sym->InVersionScript = false;
Sym->Visibility = STV_DEFAULT;
Sym->IsUsedInRegularObj = false;
Sym->ExportDynamic = false;
@@ -698,10 +697,9 @@ void SymbolTable::assignExactVersion(Sym
if (Sym->getName().contains('@'))
continue;
- 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=326641&r1=326640&r2=326641&view=diff
==============================================================================
--- lld/trunk/ELF/Symbols.h (original)
+++ lld/trunk/ELF/Symbols.h Fri Mar 2 18:13:50 2018
@@ -80,9 +80,6 @@ public:
// 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;
-
// The file from which this symbol was created.
InputFile *File;
@@ -368,7 +365,6 @@ void replaceSymbol(Symbol *S, ArgT &&...
S->ExportDynamic = Sym.ExportDynamic;
S->CanInline = Sym.CanInline;
S->Traced = Sym.Traced;
- S->InVersionScript = Sym.InVersionScript;
// Print out a log message if --trace-symbol was specified.
// This is for debugging.
More information about the llvm-commits
mailing list