@@ -285,8 +285,7 @@ bool MCExpr::evaluateAsAbsolute(int64_t &Res, const MCAssembler *Asm,
285
285
return true ;
286
286
}
287
287
288
- bool IsRelocatable =
289
- evaluateAsRelocatableImpl (Value, Asm, nullptr , Addrs, InSet);
288
+ bool IsRelocatable = evaluateAsRelocatableImpl (Value, Asm, Addrs, InSet);
290
289
291
290
// Record the current value.
292
291
Res = Value.getConstant ();
@@ -496,11 +495,11 @@ static bool evaluateSymbolicAdd(const MCAssembler *Asm,
496
495
497
496
bool MCExpr::evaluateAsRelocatable (MCValue &Res, const MCAssembler *Asm,
498
497
const MCFixup *Fixup) const {
499
- return evaluateAsRelocatableImpl (Res, Asm, Fixup, nullptr , false );
498
+ return evaluateAsRelocatableImpl (Res, Asm, nullptr , false );
500
499
}
501
500
502
501
bool MCExpr::evaluateAsValue (MCValue &Res, const MCAssembler &Asm) const {
503
- return evaluateAsRelocatableImpl (Res, &Asm, nullptr , nullptr , true );
502
+ return evaluateAsRelocatableImpl (Res, &Asm, nullptr , true );
504
503
}
505
504
506
505
static bool canExpand (const MCSymbol &Sym, bool InSet) {
@@ -520,13 +519,13 @@ static bool canExpand(const MCSymbol &Sym, bool InSet) {
520
519
}
521
520
522
521
bool MCExpr::evaluateAsRelocatableImpl (MCValue &Res, const MCAssembler *Asm,
523
- const MCFixup *Fixup,
524
522
const SectionAddrMap *Addrs,
525
523
bool InSet) const {
526
524
++stats::MCExprEvaluate;
527
525
switch (getKind ()) {
528
526
case Target:
529
- return cast<MCTargetExpr>(this )->evaluateAsRelocatableImpl (Res, Asm, Fixup);
527
+ return cast<MCTargetExpr>(this )->evaluateAsRelocatableImpl (Res, Asm,
528
+ nullptr );
530
529
531
530
case Constant:
532
531
Res = MCValue::get (cast<MCConstantExpr>(this )->getValue ());
@@ -542,8 +541,8 @@ bool MCExpr::evaluateAsRelocatableImpl(MCValue &Res, const MCAssembler *Asm,
542
541
if (Sym.isVariable () && (Kind == MCSymbolRefExpr::VK_None || Layout) &&
543
542
canExpand (Sym, InSet)) {
544
543
bool IsMachO = SRE->hasSubsectionsViaSymbols ();
545
- if (Sym.getVariableValue ()->evaluateAsRelocatableImpl (
546
- Res, Asm, Fixup, Addrs, InSet || IsMachO)) {
544
+ if (Sym.getVariableValue ()->evaluateAsRelocatableImpl (Res, Asm, Addrs,
545
+ InSet || IsMachO)) {
547
546
if (Kind != MCSymbolRefExpr::VK_None) {
548
547
if (Res.isAbsolute ()) {
549
548
Res = MCValue::get (SRE, nullptr , 0 );
@@ -588,8 +587,7 @@ bool MCExpr::evaluateAsRelocatableImpl(MCValue &Res, const MCAssembler *Asm,
588
587
const MCUnaryExpr *AUE = cast<MCUnaryExpr>(this );
589
588
MCValue Value;
590
589
591
- if (!AUE->getSubExpr ()->evaluateAsRelocatableImpl (Value, Asm, Fixup, Addrs,
592
- InSet))
590
+ if (!AUE->getSubExpr ()->evaluateAsRelocatableImpl (Value, Asm, Addrs, InSet))
593
591
return false ;
594
592
595
593
switch (AUE->getOpcode ()) {
@@ -624,9 +622,9 @@ bool MCExpr::evaluateAsRelocatableImpl(MCValue &Res, const MCAssembler *Asm,
624
622
const MCBinaryExpr *ABE = cast<MCBinaryExpr>(this );
625
623
MCValue LHSValue, RHSValue;
626
624
627
- if (!ABE->getLHS ()->evaluateAsRelocatableImpl (LHSValue, Asm, Fixup, Addrs,
625
+ if (!ABE->getLHS ()->evaluateAsRelocatableImpl (LHSValue, Asm, Addrs,
628
626
InSet) ||
629
- !ABE->getRHS ()->evaluateAsRelocatableImpl (RHSValue, Asm, Fixup, Addrs,
627
+ !ABE->getRHS ()->evaluateAsRelocatableImpl (RHSValue, Asm, Addrs,
630
628
InSet)) {
631
629
// Check if both are Target Expressions, see if we can compare them.
632
630
if (const MCTargetExpr *L = dyn_cast<MCTargetExpr>(ABE->getLHS ())) {
0 commit comments