mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-26 20:26:07 +00:00
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:
@@ -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!");
|
||||
|
Reference in New Issue
Block a user