[MC] Simplify isSymbolRefDifferenceFullyResolvedImpl overloads. NFC

The base implementation is simple. Just inline it.
This commit is contained in:
Fangrui Song 2024-06-29 16:10:33 -07:00
parent 2a6e32ea34
commit bc6d925528
2 changed files with 2 additions and 4 deletions

View File

@ -1521,8 +1521,7 @@ bool ELFObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(
SymA.getType() == ELF::STT_GNU_IFUNC)
return false;
}
return MCObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(Asm, SymA, FB,
InSet, IsPCRel);
return &SymA.getSection() == FB.getParent();
}
std::unique_ptr<MCObjectWriter>

View File

@ -1204,8 +1204,7 @@ bool WinCOFFObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(
uint16_t Type = cast<MCSymbolCOFF>(SymA).getType();
if ((Type >> COFF::SCT_COMPLEX_TYPE_SHIFT) == COFF::IMAGE_SYM_DTYPE_FUNCTION)
return false;
return MCObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(Asm, SymA, FB,
InSet, IsPCRel);
return &SymA.getSection() == FB.getParent();
}
void WinCOFFObjectWriter::executePostLayoutBinding(MCAssembler &Asm,