1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

Simplify ELFObjectWriter::ExecutePostLayoutBinding.

No functionality change. This removes the last use of AliasedSymbol in
ELFObjectWriter.cpp.

llvm-svn: 207424
This commit is contained in:
Rafael Espindola 2014-04-28 17:05:36 +00:00
parent ec86d5f514
commit b2d0a296c4

View File

@ -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('@');