1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

[MC][ELF] Drop MCSymbol::isExternal call sites

ELF uses symbol bindings and MCSymbol::isExternal is not really useful.
The function is no longer used in ELF code now.
This commit is contained in:
Fangrui Song 2020-12-20 21:18:22 -08:00
parent f274823e08
commit 3dbfad767c

View File

@ -464,7 +464,7 @@ void ELFWriter::writeHeader(const MCAssembler &Asm) {
uint64_t ELFWriter::SymbolValue(const MCSymbol &Sym,
const MCAsmLayout &Layout) {
if (Sym.isCommon() && (Sym.isTargetCommon() || Sym.isExternal()))
if (Sym.isCommon())
return Sym.getCommonAlignment();
uint64_t Res;
@ -1278,7 +1278,6 @@ void ELFObjectWriter::executePostLayoutBinding(MCAssembler &Asm,
// Aliases defined with .symvar copy the binding from the symbol they alias.
// This is the first place we are able to copy this information.
Alias->setExternal(Symbol.isExternal());
Alias->setBinding(Symbol.getBinding());
Alias->setVisibility(Symbol.getVisibility());
Alias->setOther(Symbol.getOther());