From a01780facfaa80f3ad219df2aaf9d8153a0ef850 Mon Sep 17 00:00:00 2001 From: Colin LeMahieu Date: Sat, 30 May 2015 18:42:22 +0000 Subject: [MC] Allow backends to decide relaxation for unresolved fixups. Differential Revision: http://reviews.llvm.org/D8217 llvm-svn: 238659 --- llvm/lib/MC/MCAssembler.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'llvm/lib/MC/MCAssembler.cpp') diff --git a/llvm/lib/MC/MCAssembler.cpp b/llvm/lib/MC/MCAssembler.cpp index cd14e33..7f09e74 100644 --- a/llvm/lib/MC/MCAssembler.cpp +++ b/llvm/lib/MC/MCAssembler.cpp @@ -895,13 +895,11 @@ void MCAssembler::Finish() { bool MCAssembler::fixupNeedsRelaxation(const MCFixup &Fixup, const MCRelaxableFragment *DF, const MCAsmLayout &Layout) const { - // If we cannot resolve the fixup value, it requires relaxation. MCValue Target; uint64_t Value; - if (!evaluateFixup(Layout, Fixup, DF, Target, Value)) - return true; - - return getBackend().fixupNeedsRelaxation(Fixup, Value, DF, Layout); + bool Resolved = evaluateFixup(Layout, Fixup, DF, Target, Value); + return getBackend().fixupNeedsRelaxationAdvanced(Fixup, Resolved, Value, DF, + Layout); } bool MCAssembler::fragmentNeedsRelaxation(const MCRelaxableFragment *F, -- cgit v1.1