[ELF] Remove redundant isDefined() in Symbol::computeBinding() and delete one redunda...
authorFangrui Song <maskray@google.com>
Sun, 11 Aug 2019 17:03:00 +0000 (17:03 +0000)
committerFangrui Song <maskray@google.com>
Sun, 11 Aug 2019 17:03:00 +0000 (17:03 +0000)
commitcfdd4589f144448381212922c0def4374926d70c
tree23d82adee4786eec83423d251a498c3bf08a71d2
parent635eda8bb0fde5eae101f98586146125dbbf550c
[ELF] Remove redundant isDefined() in Symbol::computeBinding() and delete one redundant call site

After r367869, VER_NDX_LOCAL can only be assigned to Defined and
CommonSymbol.  CommonSymbol becomes Defined after replaceCommonSymbols(),
thus `versionId == VER_NDX_LOCAL` will imply `isDefined()`.

In maybeReportUndefined(), computeBinding() is called when the symbol is
unknown to be Undefined. computeBinding() != STB_LOCAL will always be
true.

llvm-svn: 368536
lld/ELF/Relocations.cpp
lld/ELF/Symbols.cpp