[llvm-commits] [llvm] r148423 - /llvm/trunk/lib/MC/MachObjectWriter.cpp

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Wed Jan 18 15:04:36 PST 2012


On 18/01/12 04:54 PM, Jim Grosbach wrote:
> Author: grosbach
> Date: Wed Jan 18 15:54:12 2012
> New Revision: 148423
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=148423&view=rev
> Log:
> MCAssembler tweak for determining when a symbol difference is resolved.
> 
> If the two fragments are in the same Atom, then the difference
> expression is resolvable at compile time. Previously we were checking
> that they were in the same fragment, but that breaks down in the
> presence of instruction relaxation which has multiple fragments in the
> same atom.
> 

Given what an atom is, doesn't the condition simplify to


if (!Asm.getBackend().hasReliableSymbolDifference()) {
  if (!SA.isInSection() ||
      FB.getAtom() != Asm.getSymbolData(SA).getFragment()->getAtom())
    return false;
  return true;
}

Cheers,
Rafael



More information about the llvm-commits mailing list