mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-02 07:17:36 +00:00
MC: Rename MCSymbol::{g,s}etValue -> MCSymbol::{g,s}etVariableValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103095 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -125,11 +125,14 @@ namespace llvm {
|
|||||||
return Value != 0;
|
return Value != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// getValue() - Get the value for variable symbols, or null if the symbol
|
/// getValue() - Get the value for variable symbols.
|
||||||
/// is not a variable.
|
const MCExpr *getVariableValue() const {
|
||||||
const MCExpr *getValue() const { return Value; }
|
assert(isVariable() && "Invalid accessor!");
|
||||||
|
return Value;
|
||||||
|
}
|
||||||
|
|
||||||
void setValue(const MCExpr *Value) {
|
void setVariableValue(const MCExpr *Value) {
|
||||||
|
assert(Value && "Invalid variable value!");
|
||||||
this->Value = Value;
|
this->Value = Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ void MCAsmStreamer::EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) {
|
|||||||
|
|
||||||
// FIXME: Lift context changes into super class.
|
// FIXME: Lift context changes into super class.
|
||||||
// FIXME: Set associated section.
|
// FIXME: Set associated section.
|
||||||
Symbol->setValue(Value);
|
Symbol->setVariableValue(Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCAsmStreamer::EmitSymbolAttribute(MCSymbol *Symbol,
|
void MCAsmStreamer::EmitSymbolAttribute(MCSymbol *Symbol,
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ bool MCExpr::EvaluateAsRelocatable(MCValue &Res,
|
|||||||
|
|
||||||
// Evaluate recursively if this is a variable.
|
// Evaluate recursively if this is a variable.
|
||||||
if (Sym.isVariable()) {
|
if (Sym.isVariable()) {
|
||||||
if (!Sym.getValue()->EvaluateAsRelocatable(Res, Layout))
|
if (!Sym.getVariableValue()->EvaluateAsRelocatable(Res, Layout))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Absolutize symbol differences between defined symbols when we have a
|
// Absolutize symbol differences between defined symbols when we have a
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ void MCMachOStreamer::EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) {
|
|||||||
|
|
||||||
// FIXME: Lift context changes into super class.
|
// FIXME: Lift context changes into super class.
|
||||||
// FIXME: Set associated section.
|
// FIXME: Set associated section.
|
||||||
Symbol->setValue(AddValueSymbols(Value));
|
Symbol->setVariableValue(AddValueSymbols(Value));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCMachOStreamer::EmitSymbolAttribute(MCSymbol *Symbol,
|
void MCMachOStreamer::EmitSymbolAttribute(MCSymbol *Symbol,
|
||||||
|
|||||||
@@ -199,11 +199,11 @@ bool AsmParser::ParsePrimaryExpr(const MCExpr *&Res, SMLoc &EndLoc) {
|
|||||||
|
|
||||||
// If this is an absolute variable reference, substitute it now to preserve
|
// If this is an absolute variable reference, substitute it now to preserve
|
||||||
// semantics in the face of reassignment.
|
// semantics in the face of reassignment.
|
||||||
if (Sym->getValue() && isa<MCConstantExpr>(Sym->getValue())) {
|
if (Sym->isVariable() && isa<MCConstantExpr>(Sym->getVariableValue())) {
|
||||||
if (Variant)
|
if (Variant)
|
||||||
return Error(EndLoc, "unexpected modified on variable reference");
|
return Error(EndLoc, "unexpected modified on variable reference");
|
||||||
|
|
||||||
Res = Sym->getValue();
|
Res = Sym->getVariableValue();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -790,7 +790,7 @@ bool AsmParser::ParseAssignment(const StringRef &Name) {
|
|||||||
return Error(EqualLoc, "redefinition of '" + Name + "'");
|
return Error(EqualLoc, "redefinition of '" + Name + "'");
|
||||||
else if (!Sym->isVariable())
|
else if (!Sym->isVariable())
|
||||||
return Error(EqualLoc, "invalid assignment to '" + Name + "'");
|
return Error(EqualLoc, "invalid assignment to '" + Name + "'");
|
||||||
else if (!isa<MCConstantExpr>(Sym->getValue()))
|
else if (!isa<MCConstantExpr>(Sym->getVariableValue()))
|
||||||
return Error(EqualLoc, "invalid reassignment of non-absolute variable '" +
|
return Error(EqualLoc, "invalid reassignment of non-absolute variable '" +
|
||||||
Name + "'");
|
Name + "'");
|
||||||
} else
|
} else
|
||||||
|
|||||||
Reference in New Issue
Block a user