mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
MC: Move assembler variable values from MCContext to MCSymbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84229 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -181,8 +181,11 @@ bool MCExpr::EvaluateAsRelocatable(MCContext &Ctx, MCValue &Res) const {
|
||||
|
||||
case SymbolRef: {
|
||||
const MCSymbol &Sym = cast<MCSymbolRefExpr>(this)->getSymbol();
|
||||
if (const MCExpr *Value = Ctx.GetSymbolValue(&Sym))
|
||||
return Value->EvaluateAsRelocatable(Ctx, Res);
|
||||
|
||||
// Evaluate recursively if this is a variable.
|
||||
if (Sym.isVariable())
|
||||
return Sym.getValue()->EvaluateAsRelocatable(Ctx, Res);
|
||||
|
||||
Res = MCValue::get(&Sym, 0, 0);
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user