Skip to content

Commit 534f6ed

Browse files
committed
[MC,MachO] Remove unneeded condition from isSymbolRefDifferenceFullyResolvedImpl
The code change from 91ea511 (2011) can now be removed.
1 parent 4a96803 commit 534f6ed

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

llvm/lib/MC/MachObjectWriter.cpp

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -716,18 +716,8 @@ bool MachObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(
716716
if (&SecA != &SecB)
717717
return false;
718718

719-
const MCFragment *FA = SA.getFragment();
720-
721-
// Bail if the symbol has no fragment.
722-
if (!FA)
723-
return false;
724-
725719
// If the atoms are the same, they are guaranteed to have the same address.
726-
if (FA->getAtom() == FB.getAtom())
727-
return true;
728-
729-
// Otherwise, we can't prove this is fully resolved.
730-
return false;
720+
return SA.getFragment()->getAtom() == FB.getAtom();
731721
}
732722

733723
static MachO::LoadCommandType getLCFromMCVM(MCVersionMinType Type) {

0 commit comments

Comments
 (0)