Index: lib/Target/AVR/MCTargetDesc/AVRAsmBackend.h =================================================================== --- lib/Target/AVR/MCTargetDesc/AVRAsmBackend.h +++ lib/Target/AVR/MCTargetDesc/AVRAsmBackend.h @@ -40,7 +40,7 @@ MCObjectWriter *createObjectWriter(raw_pwrite_stream &OS) const override; - void applyFixup(const MCFixup &Fixup, char *Data, unsigned DataSize, + void applyFixup(const MCFixup &Fixup, MutableArrayRef Data, uint64_t Value, bool IsPCRel, MCContext &Ctx) const override; const MCFixupKindInfo &getFixupKindInfo(MCFixupKind Kind) const override; Index: lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp =================================================================== --- lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp +++ lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp @@ -333,9 +333,8 @@ MCELFObjectTargetWriter::getOSABI(OSType)); } -void AVRAsmBackend::applyFixup(const MCFixup &Fixup, char *Data, - unsigned DataSize, uint64_t Value, - bool IsPCRel, MCContext &Ctx) const { +void AVRAsmBackend::applyFixup(const MCFixup &Fixup, MutableArrayRef Data, + uint64_t Value, bool IsPCRel, MCContext &Ctx) const { if (Value == 0) return; // Doesn't change encoding. @@ -349,7 +348,7 @@ Value <<= Info.TargetOffset; unsigned Offset = Fixup.getOffset(); - assert(Offset + NumBytes <= DataSize && "Invalid fixup offset!"); + assert(Offset + NumBytes <= Data.size() && "Invalid fixup offset!"); // For each byte of the fragment that the fixup touches, mask in the // bits from the fixup value.