mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-10 18:34:09 +00:00
Simplify ELFObjectWriter::ExecutePostLayoutBinding.
No functionality change. This removes the last use of AliasedSymbol in ELFObjectWriter.cpp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207424 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2f3691eb61
commit
ac22ae75e3
@ -531,12 +531,15 @@ void ELFObjectWriter::ExecutePostLayoutBinding(MCAssembler &Asm,
|
||||
|
||||
for (MCSymbolData &OriginalData : Asm.symbols()) {
|
||||
const MCSymbol &Alias = OriginalData.getSymbol();
|
||||
const MCSymbol &Symbol = Alias.AliasedSymbol();
|
||||
MCSymbolData &SD = Asm.getSymbolData(Symbol);
|
||||
|
||||
// Not an alias.
|
||||
if (&Symbol == &Alias)
|
||||
if (!Alias.isVariable())
|
||||
continue;
|
||||
auto *Ref = dyn_cast<MCSymbolRefExpr>(Alias.getVariableValue());
|
||||
if (!Ref)
|
||||
continue;
|
||||
const MCSymbol &Symbol = Ref->getSymbol();
|
||||
MCSymbolData &SD = Asm.getSymbolData(Symbol);
|
||||
|
||||
StringRef AliasName = Alias.getName();
|
||||
size_t Pos = AliasName.find('@');
|
||||
|
Loading…
x
Reference in New Issue
Block a user