summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCObjectWriter.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-03-25 13:16:53 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-03-25 13:16:53 +0000
commitf275ad8af13d2e539dfa6ee882ef89a885e4164a (patch)
tree2dbc98d23aeeaecd464753bc5a09f3af0391f371 /llvm/lib/MC/MCObjectWriter.cpp
parent235838e1b8ab36e139b190780c2ac5f3e2f86101 (diff)
downloadbcm5719-llvm-f275ad8af13d2e539dfa6ee882ef89a885e4164a.tar.gz
bcm5719-llvm-f275ad8af13d2e539dfa6ee882ef89a885e4164a.zip
Fix fixup evaluation when deciding what to relocate with.
The previous logic was to first try without relocations at all and failing that stop on the first defined symbol. That was inefficient and incorrect in the case part of the expression could be simplified and another part could not (see included test). We now stop the evaluation when we get to a variable whose value can change (i.e. is weak). llvm-svn: 233187
Diffstat (limited to 'llvm/lib/MC/MCObjectWriter.cpp')
-rw-r--r--llvm/lib/MC/MCObjectWriter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCObjectWriter.cpp b/llvm/lib/MC/MCObjectWriter.cpp
index 94d7cd6fd4f..55bdd0b8439 100644
--- a/llvm/lib/MC/MCObjectWriter.cpp
+++ b/llvm/lib/MC/MCObjectWriter.cpp
@@ -54,3 +54,5 @@ MCObjectWriter::IsSymbolRefDifferenceFullyResolvedImpl(const MCAssembler &Asm,
// On ELF and COFF A - B is absolute if A and B are in the same section.
return &SecA == &SecB;
}
+
+bool MCObjectWriter::isWeak(const MCSymbolData &SD) const { return false; }
OpenPOWER on IntegriCloud