MCAssembler: Move ApplyFixup to the TargetAsmBackend, this is a target specific not object writer specific task.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98947 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/MC/MCAssembler.cpp b/lib/MC/MCAssembler.cpp
index 500f23f..c4c3a8a 100644
--- a/lib/MC/MCAssembler.cpp
+++ b/lib/MC/MCAssembler.cpp
@@ -930,17 +930,6 @@
OS << StringTable.str();
}
}
-
- void ApplyFixup(const MCAsmFixup &Fixup, MCDataFragment &DF,
- uint64_t FixedValue) {
- unsigned Size = 1 << getFixupKindLog2Size(Fixup.Kind);
-
- // FIXME: Endianness assumption.
- assert(Fixup.Offset + Size <= DF.getContents().size() &&
- "Invalid fixup offset!");
- for (unsigned i = 0; i != Size; ++i)
- DF.getContents()[Fixup.Offset + i] = uint8_t(FixedValue >> (i * 8));
- }
};
/* *** */
@@ -1475,7 +1464,7 @@
MOW.RecordRelocation(*this, *DF, Fixup, Target, FixedValue);
}
- MOW.ApplyFixup(Fixup, *DF, FixedValue);
+ getBackend().ApplyFixup(Fixup, *DF, FixedValue);
}
}
}