From 88d9e37ec84c86942284d69f3794b824a99e5fab Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 21 Jun 2017 23:06:53 +0000 Subject: Use a MutableArrayRef. NFC. llvm-svn: 305968 --- llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'llvm/lib/Target/AMDGPU') diff --git a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp index 0a9c2b94c1e..d4d845c5322 100644 --- a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp +++ b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp @@ -36,7 +36,7 @@ public: const MCValue &Target, uint64_t &Value, bool &IsResolved) 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; bool fixupNeedsRelaxation(const MCFixup &Fixup, uint64_t Value, const MCRelaxableFragment *DF, @@ -129,8 +129,8 @@ void AMDGPUAsmBackend::processFixupValue(const MCAssembler &Asm, Value = adjustFixupValue(Fixup, Value, &Asm.getContext()); } -void AMDGPUAsmBackend::applyFixup(const MCFixup &Fixup, char *Data, - unsigned DataSize, uint64_t Value, +void AMDGPUAsmBackend::applyFixup(const MCFixup &Fixup, + MutableArrayRef Data, uint64_t Value, bool IsPCRel, MCContext &Ctx) const { if (!Value) return; // Doesn't change encoding. @@ -142,7 +142,7 @@ void AMDGPUAsmBackend::applyFixup(const MCFixup &Fixup, char *Data, unsigned NumBytes = getFixupKindNumBytes(Fixup.getKind()); uint32_t 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. -- cgit v1.2.3