- int64_t getCst() const { return Cst; }
+ int64_t getConstant() const { return Cst; }
MCSymbol *getSymA() const { return SymA; }
MCSymbol *getSymB() const { return SymB; }
MCSymbol *getSymA() const { return SymA; }
MCSymbol *getSymB() const { return SymB; }
+
+ bool isConstant() const { return !SymA && !SymB; }
static MCValue get(MCSymbol *SymA, MCSymbol *SymB = 0, int64_t Val = 0) {
MCValue R;
static MCValue get(MCSymbol *SymA, MCSymbol *SymB = 0, int64_t Val = 0) {
MCValue R;
os << Value.getSymA()->getName();
if (Value.getSymB())
os << " - " << Value.getSymB()->getName();
os << Value.getSymA()->getName();
if (Value.getSymB())
os << " - " << Value.getSymB()->getName();
- if (Value.getCst())
- os << " + " << Value.getCst();
+ if (Value.getConstant())
+ os << " + " << Value.getConstant();
} else {
assert(!Value.getSymB() && "Invalid machine code value!");
} else {
assert(!Value.getSymB() && "Invalid machine code value!");
+ os << Value.getConstant();
static inline MCValue truncateToSize(const MCValue &Value, unsigned Bytes) {
return MCValue::get(Value.getSymA(), Value.getSymB(),
static inline MCValue truncateToSize(const MCValue &Value, unsigned Bytes) {
return MCValue::get(Value.getSymA(), Value.getSymB(),
- truncateToSize(Value.getCst(), Bytes));
+ truncateToSize(Value.getConstant(), Bytes));
}
void MCAsmStreamer::SwitchSection(MCSection *Section) {
}
void MCAsmStreamer::SwitchSection(MCSection *Section) {