Skip to content

Commit bc6d925

Browse files
committed
[MC] Simplify isSymbolRefDifferenceFullyResolvedImpl overloads. NFC
The base implementation is simple. Just inline it.
1 parent 2a6e32e commit bc6d925

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

llvm/lib/MC/ELFObjectWriter.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1521,8 +1521,7 @@ bool ELFObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(
15211521
SymA.getType() == ELF::STT_GNU_IFUNC)
15221522
return false;
15231523
}
1524-
return MCObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(Asm, SymA, FB,
1525-
InSet, IsPCRel);
1524+
return &SymA.getSection() == FB.getParent();
15261525
}
15271526

15281527
std::unique_ptr<MCObjectWriter>

llvm/lib/MC/WinCOFFObjectWriter.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,8 +1204,7 @@ bool WinCOFFObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(
12041204
uint16_t Type = cast<MCSymbolCOFF>(SymA).getType();
12051205
if ((Type >> COFF::SCT_COMPLEX_TYPE_SHIFT) == COFF::IMAGE_SYM_DTYPE_FUNCTION)
12061206
return false;
1207-
return MCObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(Asm, SymA, FB,
1208-
InSet, IsPCRel);
1207+
return &SymA.getSection() == FB.getParent();
12091208
}
12101209

12111210
void WinCOFFObjectWriter::executePostLayoutBinding(MCAssembler &Asm,

0 commit comments

Comments
 (0)