@@ -191,10 +191,10 @@ void X86MachObjectWriter::RecordX86_64Relocation(
191191 return ;
192192 }
193193
194- Value += Writer->getSymbolAddress (*A, Asm ) -
195- (!A_Base ? 0 : Writer->getSymbolAddress (*A_Base, Asm ));
196- Value -= Writer->getSymbolAddress (*B, Asm ) -
197- (!B_Base ? 0 : Writer->getSymbolAddress (*B_Base, Asm ));
194+ Value += Writer->getSymbolAddress (*A) -
195+ (!A_Base ? 0 : Writer->getSymbolAddress (*A_Base));
196+ Value -= Writer->getSymbolAddress (*B) -
197+ (!B_Base ? 0 : Writer->getSymbolAddress (*B_Base));
198198
199199 if (!A_Base)
200200 Index = A->getFragment ()->getParent ()->getOrdinal () + 1 ;
@@ -241,12 +241,12 @@ void X86MachObjectWriter::RecordX86_64Relocation(
241241 } else if (Symbol->isInSection () && !Symbol->isVariable ()) {
242242 // The index is the section ordinal (1-based).
243243 Index = Symbol->getFragment ()->getParent ()->getOrdinal () + 1 ;
244- Value += Writer->getSymbolAddress (*Symbol, Asm );
244+ Value += Writer->getSymbolAddress (*Symbol);
245245
246246 if (IsPCRel)
247247 Value -= FixupAddress + (1 << Log2Size);
248248 } else if (Symbol->isVariable ()) {
249- FixedValue = Writer->getSymbolAddress (*Symbol, Asm );
249+ FixedValue = Writer->getSymbolAddress (*Symbol);
250250 return ;
251251 } else {
252252 Asm.getContext ().reportError (
@@ -369,7 +369,7 @@ bool X86MachObjectWriter::recordScatteredRelocation(MachObjectWriter *Writer,
369369 return false ;
370370 }
371371
372- uint32_t Value = Writer->getSymbolAddress (*A, Asm );
372+ uint32_t Value = Writer->getSymbolAddress (*A);
373373 uint64_t SecAddr = Writer->getSectionAddress (A->getFragment ()->getParent ());
374374 FixedValue += SecAddr;
375375 uint32_t Value2 = 0 ;
@@ -390,7 +390,7 @@ bool X86MachObjectWriter::recordScatteredRelocation(MachObjectWriter *Writer,
390390 // pedantic compatibility with 'as'.
391391 Type = A->isExternal () ? (unsigned )MachO::GENERIC_RELOC_SECTDIFF
392392 : (unsigned )MachO::GENERIC_RELOC_LOCAL_SECTDIFF;
393- Value2 = Writer->getSymbolAddress (*SB, Asm );
393+ Value2 = Writer->getSymbolAddress (*SB);
394394 FixedValue -= Writer->getSectionAddress (SB->getFragment ()->getParent ());
395395 }
396396
@@ -466,8 +466,8 @@ void X86MachObjectWriter::recordTLVPRelocation(MachObjectWriter *Writer,
466466 uint32_t FixupAddress =
467467 Writer->getFragmentAddress (Asm, Fragment) + Fixup.getOffset ();
468468 IsPCRel = 1 ;
469- FixedValue = FixupAddress - Writer-> getSymbolAddress (*SymB, Asm) +
470- Target.getConstant ();
469+ FixedValue =
470+ FixupAddress - Writer-> getSymbolAddress (*SymB) + Target.getConstant ();
471471 FixedValue += 1ULL << Log2Size;
472472 } else {
473473 FixedValue = 0 ;
@@ -543,8 +543,8 @@ void X86MachObjectWriter::RecordX86Relocation(MachObjectWriter *Writer,
543543 int64_t Res = Val.getConstant ();
544544 bool isAbs = Val.isAbsolute ();
545545 if (Relocatable && Val.getAddSym () && Val.getSubSym ()) {
546- Res += Writer->getSymbolAddress (*Val.getAddSym (), Asm ) -
547- Writer->getSymbolAddress (*Val.getSubSym (), Asm );
546+ Res += Writer->getSymbolAddress (*Val.getAddSym ()) -
547+ Writer->getSymbolAddress (*Val.getSubSym ());
548548 isAbs = true ;
549549 }
550550 if (isAbs) {
0 commit comments