@@ -286,8 +286,8 @@ bool MCExpr::evaluateAsAbsolute(int64_t &Res, const MCAssembler *Asm,
286286 }
287287
288288 bool IsRelocatable = evaluateAsRelocatableImpl (Value, Asm, Addrs, InSet);
289- Res = Value.getConstant ();
290- // Value with RefKind (e.g. %hi(0xdeadbeef) in MIPS) is not considered
289+ Res = Value.getConstant (); // Value with RefKind (e.g. %hi(0xdeadbeef) in
290+ // MIPS) is not considered
291291 // absolute (the value is unknown at parse time), even if it might be resolved
292292 // by evaluateFixup.
293293 return IsRelocatable && Value.isAbsolute () && Value.getRefKind () == 0 ;
@@ -493,15 +493,12 @@ static bool evaluateSymbolicAdd(const MCAssembler *Asm,
493493 return true ;
494494}
495495
496- bool MCExpr::evaluateAsRelocatable (MCValue &Res, const MCAssembler *Asm,
497- const MCFixup *Fixup) const {
496+ bool MCExpr::evaluateAsRelocatable (MCValue &Res, const MCAssembler *Asm) const {
498497 return evaluateAsRelocatableImpl (Res, Asm, nullptr , false );
499498}
500-
501499bool MCExpr::evaluateAsValue (MCValue &Res, const MCAssembler &Asm) const {
502500 return evaluateAsRelocatableImpl (Res, &Asm, nullptr , true );
503501}
504-
505502static bool canExpand (const MCSymbol &Sym, bool InSet) {
506503 if (Sym.isWeakExternal ())
507504 return false ;
@@ -524,9 +521,7 @@ bool MCExpr::evaluateAsRelocatableImpl(MCValue &Res, const MCAssembler *Asm,
524521 ++stats::MCExprEvaluate;
525522 switch (getKind ()) {
526523 case Target:
527- return cast<MCTargetExpr>(this )->evaluateAsRelocatableImpl (Res, Asm,
528- nullptr );
529-
524+ return cast<MCTargetExpr>(this )->evaluateAsRelocatableImpl (Res, Asm);
530525 case Constant:
531526 Res = MCValue::get (cast<MCConstantExpr>(this )->getValue ());
532527 return true ;
@@ -589,7 +584,6 @@ bool MCExpr::evaluateAsRelocatableImpl(MCValue &Res, const MCAssembler *Asm,
589584
590585 if (!AUE->getSubExpr ()->evaluateAsRelocatableImpl (Value, Asm, Addrs, InSet))
591586 return false ;
592-
593587 switch (AUE->getOpcode ()) {
594588 case MCUnaryExpr::LNot:
595589 if (!Value.isAbsolute ())
0 commit comments