@@ -125,15 +125,11 @@ bool MCAssembler::isThumbFunc(const MCSymbol *Symbol) const {
125125 if (V.getSubSym () || V.getRefKind () != MCSymbolRefExpr::VK_None)
126126 return false ;
127127
128- const MCSymbolRefExpr *Ref = V.getSymA ();
129- if (!Ref )
128+ auto *Sym = V.getAddSym ();
129+ if (!Sym || V. getSymSpecifier () )
130130 return false ;
131131
132- if (Ref->getKind () != MCSymbolRefExpr::VK_None)
133- return false ;
134-
135- const MCSymbol &Sym = Ref->getSymbol ();
136- if (!isThumbFunc (&Sym))
132+ if (!isThumbFunc (Sym))
137133 return false ;
138134
139135 ThumbFuncs.insert (Symbol); // Cache it.
@@ -460,14 +456,14 @@ static bool getSymbolOffsetImpl(const MCAssembler &Asm, const MCSymbol &S,
460456
461457 uint64_t Offset = Target.getConstant ();
462458
463- const MCSymbolRefExpr *A = Target.getSymA ();
459+ const MCSymbol *A = Target.getAddSym ();
464460 if (A) {
465461 uint64_t ValA;
466462 // FIXME: On most platforms, `Target`'s component symbols are labels from
467463 // having been simplified during evaluation, but on Mach-O they can be
468464 // variables due to PR19203. This, and the line below for `B` can be
469465 // restored to call `getLabelOffset` when PR19203 is fixed.
470- if (!getSymbolOffsetImpl (Asm, A-> getSymbol () , ReportError, ValA))
466+ if (!getSymbolOffsetImpl (Asm, *A , ReportError, ValA))
471467 return false ;
472468 Offset += ValA;
473469 }
@@ -516,11 +512,11 @@ const MCSymbol *MCAssembler::getBaseSymbol(const MCSymbol &Symbol) const {
516512 return nullptr ;
517513 }
518514
519- const MCSymbolRefExpr *A = Value.getSymA ();
515+ const MCSymbol *A = Value.getAddSym ();
520516 if (!A)
521517 return nullptr ;
522518
523- const MCSymbol &ASym = A-> getSymbol () ;
519+ const MCSymbol &ASym = *A ;
524520 if (ASym.isCommon ()) {
525521 getContext ().reportError (Expr->getLoc (),
526522 " Common symbol '" + ASym.getName () +
0 commit comments