[lld] r316862 - Remove a redundant temporary variable.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 29 09:46:39 PDT 2017
Author: ruiu
Date: Sun Oct 29 09:46:39 2017
New Revision: 316862
URL: http://llvm.org/viewvc/llvm-project?rev=316862&view=rev
Log:
Remove a redundant temporary variable.
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=316862&r1=316861&r2=316862&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.cpp (original)
+++ lld/trunk/ELF/SymbolTable.cpp Sun Oct 29 09:46:39 2017
@@ -273,7 +273,6 @@ std::pair<Symbol *, bool> SymbolTable::i
uint8_t Visibility,
bool CanOmitFromDynSym,
InputFile *File) {
- bool IsUsedInRegularObj = !File || File->kind() == InputFile::ObjKind;
Symbol *S;
bool WasInserted;
std::tie(S, WasInserted) = insert(Name);
@@ -284,7 +283,7 @@ std::pair<Symbol *, bool> SymbolTable::i
if (!CanOmitFromDynSym && (Config->Shared || Config->ExportDynamic))
S->ExportDynamic = true;
- if (IsUsedInRegularObj)
+ if (!File || File->kind() == InputFile::ObjKind)
S->IsUsedInRegularObj = true;
if (!WasInserted && S->body()->Type != SymbolBody::UnknownType &&
More information about the llvm-commits
mailing list