diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2017-06-21 23:06:53 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2017-06-21 23:06:53 +0000 |
| commit | 88d9e37ec84c86942284d69f3794b824a99e5fab (patch) | |
| tree | 4c7263115d8cbdc49e6170a891c5013b8ff0a308 /llvm/lib/Target/ARM/MCTargetDesc | |
| parent | 6da25f4fc47353834ba0f1f8e6b9ef570caa662a (diff) | |
| download | bcm5719-llvm-88d9e37ec84c86942284d69f3794b824a99e5fab.tar.gz bcm5719-llvm-88d9e37ec84c86942284d69f3794b824a99e5fab.zip | |
Use a MutableArrayRef. NFC.
llvm-svn: 305968
Diffstat (limited to 'llvm/lib/Target/ARM/MCTargetDesc')
| -rw-r--r-- | llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp | 8 | ||||
| -rw-r--r-- | llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp b/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp index 716492ea256..1e76f107a84 100644 --- a/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp +++ b/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp @@ -875,8 +875,8 @@ static unsigned getFixupKindContainerSizeBytes(unsigned Kind) { } } -void ARMAsmBackend::applyFixup(const MCFixup &Fixup, char *Data, - unsigned DataSize, uint64_t Value, bool IsPCRel, +void ARMAsmBackend::applyFixup(const MCFixup &Fixup, MutableArrayRef<char> Data, + uint64_t Value, bool IsPCRel, MCContext &Ctx) const { unsigned NumBytes = getFixupKindNumBytes(Fixup.getKind()); Value = adjustFixupValue(Fixup, Value, IsPCRel, Ctx, IsLittleEndian, true); @@ -884,13 +884,13 @@ void ARMAsmBackend::applyFixup(const MCFixup &Fixup, char *Data, return; // Doesn't change encoding. unsigned Offset = Fixup.getOffset(); - assert(Offset + NumBytes <= DataSize && "Invalid fixup offset!"); + assert(Offset + NumBytes <= Data.size() && "Invalid fixup offset!"); // Used to point to big endian bytes. unsigned FullSizeBytes; if (!IsLittleEndian) { FullSizeBytes = getFixupKindContainerSizeBytes(Fixup.getKind()); - assert((Offset + FullSizeBytes) <= DataSize && "Invalid fixup size!"); + assert((Offset + FullSizeBytes) <= Data.size() && "Invalid fixup size!"); assert(NumBytes <= FullSizeBytes && "Invalid fixup size!"); } diff --git a/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.h b/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.h index 2ddedb5d610..cb5e6e2eaef 100644 --- a/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.h +++ b/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.h @@ -49,7 +49,7 @@ public: MCContext &Ctx, bool IsLittleEndian, bool IsResolved) const; - void applyFixup(const MCFixup &Fixup, char *Data, unsigned DataSize, + void applyFixup(const MCFixup &Fixup, MutableArrayRef<char> Data, uint64_t Value, bool IsPCRel, MCContext &Ctx) const override; unsigned getRelaxedOpcode(unsigned Op) const; |

