From 09bfa58edd62af6ecbf1ea5177e27e55ab782160 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Sat, 16 May 2015 00:48:58 +0000 Subject: MC: Change MCFragment::Atom to an MCSymbol, NFC Change `MCFragment::Atom` from an `MCSymbolData` to an `MCSymbol`, moving in the direction of removing the back-pointer. llvm-svn: 237497 --- llvm/lib/MC/MachObjectWriter.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'llvm/lib/MC/MachObjectWriter.cpp') diff --git a/llvm/lib/MC/MachObjectWriter.cpp b/llvm/lib/MC/MachObjectWriter.cpp index 3ffdc701e65..109e908988f 100644 --- a/llvm/lib/MC/MachObjectWriter.cpp +++ b/llvm/lib/MC/MachObjectWriter.cpp @@ -679,8 +679,6 @@ bool MachObjectWriter::IsSymbolRefDifferenceFullyResolvedImpl( // - addr(atom(B)) - offset(B) // and the offsets are not relocatable, so the fixup is fully resolved when // addr(atom(A)) - addr(atom(B)) == 0. - const MCSymbolData *A_Base = nullptr, *B_Base = nullptr; - const MCSymbol &SA = findAliasedSymbol(DataA.getSymbol()); const MCSection &SecA = SA.getSection(); const MCSection &SecB = FB.getParent()->getSection(); @@ -733,11 +731,8 @@ bool MachObjectWriter::IsSymbolRefDifferenceFullyResolvedImpl( if (!FA) return false; - A_Base = FA->getAtom(); - B_Base = FB.getAtom(); - // If the atoms are the same, they are guaranteed to have the same address. - if (A_Base == B_Base) + if (FA->getAtom() == FB.getAtom()) return true; // Otherwise, we can't prove this is fully resolved. -- cgit v1.2.3