summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2012-01-18 21:54:12 +0000
committerJim Grosbach <grosbach@apple.com>2012-01-18 21:54:12 +0000
commitd4dbd09d854f7e3834e95cd59f4c945afbd01109 (patch)
treeeba2e9ef5641b824c43cddc7441424621ee5ea60 /llvm/lib
parent9ab3d8be4ea6b750d1be720a490b735a4bb4bc56 (diff)
downloadbcm5719-llvm-d4dbd09d854f7e3834e95cd59f4c945afbd01109.tar.gz
bcm5719-llvm-d4dbd09d854f7e3834e95cd59f4c945afbd01109.zip
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 llvm-svn: 148423
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/MC/MachObjectWriter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/MC/MachObjectWriter.cpp b/llvm/lib/MC/MachObjectWriter.cpp
index ce222b75cf4..a3445219f1e 100644
--- a/llvm/lib/MC/MachObjectWriter.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud