diff --git a/lib/MC/MachObjectWriter.cpp b/lib/MC/MachObjectWriter.cpp index ce222b75cf4..a3445219f1e 100644 --- a/lib/MC/MachObjectWriter.cpp +++ b/lib/MC/MachObjectWriter.cpp @@ -591,7 +591,8 @@ IsSymbolRefDifferenceFullyResolvedImpl(const MCAssembler &Asm, if (!Asm.getBackend().hasReliableSymbolDifference()) { if (!SA.isInSection() || &SecA != &SecB || - (!SA.isTemporary() && &FB != Asm.getSymbolData(SA).getFragment())) + (!SA.isTemporary() && + FB.getAtom() != Asm.getSymbolData(SA).getFragment()->getAtom())) return false; return true; }