Changeset View
Changeset View
Standalone View
Standalone View
llvm/trunk/lib/MC/ELFObjectWriter.cpp
Show First 20 Lines • Show All 1,273 Lines • ▼ Show 20 Lines | for (const std::pair<StringRef, const MCSymbol *> &P : Asm.Symvers) { | ||||
Asm.registerSymbol(*Alias); | Asm.registerSymbol(*Alias); | ||||
const MCExpr *Value = MCSymbolRefExpr::create(&Symbol, Asm.getContext()); | const MCExpr *Value = MCSymbolRefExpr::create(&Symbol, Asm.getContext()); | ||||
Alias->setVariableValue(Value); | Alias->setVariableValue(Value); | ||||
// Aliases defined with .symvar copy the binding from the symbol they alias. | // Aliases defined with .symvar copy the binding from the symbol they alias. | ||||
// This is the first place we are able to copy this information. | // This is the first place we are able to copy this information. | ||||
Alias->setExternal(Symbol.isExternal()); | Alias->setExternal(Symbol.isExternal()); | ||||
Alias->setBinding(Symbol.getBinding()); | Alias->setBinding(Symbol.getBinding()); | ||||
Alias->setOther(Symbol.getOther()); | |||||
if (!Symbol.isUndefined() && !Rest.startswith("@@@")) | if (!Symbol.isUndefined() && !Rest.startswith("@@@")) | ||||
continue; | continue; | ||||
// FIXME: Get source locations for these errors or diagnose them earlier. | // FIXME: Get source locations for these errors or diagnose them earlier. | ||||
if (Symbol.isUndefined() && Rest.startswith("@@") && | if (Symbol.isUndefined() && Rest.startswith("@@") && | ||||
!Rest.startswith("@@@")) { | !Rest.startswith("@@@")) { | ||||
Asm.getContext().reportError(SMLoc(), "versioned symbol " + AliasName + | Asm.getContext().reportError(SMLoc(), "versioned symbol " + AliasName + | ||||
▲ Show 20 Lines • Show All 264 Lines • Show Last 20 Lines |