Move AliasedSymbol to MachObjectWriter.

It was only used by MachO.
Part of pr19627.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235185 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2015-04-17 12:28:43 +00:00
parent dc71d8a7b9
commit db244041cd
5 changed files with 18 additions and 21 deletions

View File

@@ -39,18 +39,6 @@ static bool NameNeedsQuoting(StringRef Str) {
return false;
}
const MCSymbol &MCSymbol::AliasedSymbol() const {
const MCSymbol *S = this;
while (S->isVariable()) {
const MCExpr *Value = S->getVariableValue();
if (Value->getKind() != MCExpr::SymbolRef)
return *S;
const MCSymbolRefExpr *Ref = static_cast<const MCSymbolRefExpr*>(Value);
S = &Ref->getSymbol();
}
return *S;
}
void MCSymbol::setVariableValue(const MCExpr *Value) {
assert(!IsUsed && "Cannot set a variable that has already been used.");
assert(Value && "Invalid variable value!");