From 828787a0593b2410faf8b3fb53e80745e3d36c02 Mon Sep 17 00:00:00 2001 From: George Rimar Date: Sun, 6 Nov 2016 08:39:46 +0000 Subject: [PATCH] [ELF] - Change argument of computeHash to MutableArrayRef. NFC. This fixes casting warning and removes the need of that cast at all. llvm-svn: 286065 --- lld/ELF/SyntheticSections.cpp | 4 ++-- lld/ELF/SyntheticSections.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp index 03dc6d0..a3655d1 100644 --- a/lld/ELF/SyntheticSections.cpp +++ b/lld/ELF/SyntheticSections.cpp @@ -124,7 +124,7 @@ static std::vector> split(ArrayRef Arr, template void BuildIdSection::computeHash( - llvm::ArrayRef Data, + llvm::MutableArrayRef Data, std::function Arr, uint8_t *Hash)> Hash) { std::vector> Chunks = split(Data, 1024 * 1024); std::vector HashList(Chunks.size() * HashSize); @@ -141,7 +141,7 @@ void BuildIdSection::computeHash( Hash(Chunk, HashList.data() + Id * HashSize); }); - Hash(HashList, this->getOutputLoc((uint8_t *)Data.begin()) + 16); + Hash(HashList, this->getOutputLoc(Data.begin()) + 16); } template diff --git a/lld/ELF/SyntheticSections.h b/lld/ELF/SyntheticSections.h index 27a8d65..9cf622a 100644 --- a/lld/ELF/SyntheticSections.h +++ b/lld/ELF/SyntheticSections.h @@ -40,7 +40,7 @@ protected: std::vector Buf; void - computeHash(llvm::ArrayRef Buf, + computeHash(llvm::MutableArrayRef Buf, std::function Arr, uint8_t *Hash)> Hash); size_t HashSize; -- 2.7.4