[llvm-commits] [llvm] r148423 - /llvm/trunk/lib/MC/MachObjectWriter.cpp
Jim Grosbach
grosbach at apple.com
Wed Jan 18 13:54:12 PST 2012
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.
rdar://10711829
Modified:
llvm/trunk/lib/MC/MachObjectWriter.cpp
Modified: llvm/trunk/lib/MC/MachObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MachObjectWriter.cpp?rev=148423&r1=148422&r2=148423&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MachObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/MachObjectWriter.cpp Wed Jan 18 15:54:12 2012
@@ -591,7 +591,8 @@
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;
}
More information about the llvm-commits
mailing list