MCSymbol *getSymA() const { return SymA; }
MCSymbol *getSymB() const { return SymB; }
- bool isConstant() const { return !SymA && !SymB; }
+ /// isAbsolute - Is this an absolute (as opposed to relocatable) value.
+ bool isAbsolute() const { return !SymA && !SymB; }
/// getAssociatedSection - For relocatable values, return the section the
/// value is associated with.
bool AsmExpr::EvaluateAsAbsolute(MCContext &Ctx, int64_t &Res) const {
MCValue Value;
- if (!EvaluateAsRelocatable(Ctx, Value) || !Value.isConstant())
+ if (!EvaluateAsRelocatable(Ctx, Value) || !Value.isAbsolute())
return false;
Res = Value.getConstant();
switch (AUE->getOpcode()) {
case AsmUnaryExpr::LNot:
- if (!Value.isConstant())
+ if (!Value.isAbsolute())
return false;
Res = MCValue::get(!Value.getConstant());
break;
-Value.getConstant());
break;
case AsmUnaryExpr::Not:
- if (!Value.isConstant())
+ if (!Value.isAbsolute())
return false;
Res = MCValue::get(~Value.getConstant());
break;
// We only support a few operations on non-constant expressions, handle
// those first.
- if (!LHSValue.isConstant() || !RHSValue.isConstant()) {
+ if (!LHSValue.isAbsolute() || !RHSValue.isAbsolute()) {
switch (ABE->getOpcode()) {
default:
return false;