From d6bf04f4760b0dff3c3d3ff9b560c04438cc25ac Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 26 Apr 2024 18:38:15 -0700 Subject: [LTO] Remove extraneous ArrayRef (NFC) (#90306) We don't need to explicitly create these instances of ArrayRef because Hasher::update takes ArrayRef, and ArrayRef can be implicitly constructed from C arrays. --- llvm/lib/LTO/LTO.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/LTO/LTO.cpp') diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp index 53060df..21cad1d 100644 --- a/llvm/lib/LTO/LTO.cpp +++ b/llvm/lib/LTO/LTO.cpp @@ -114,12 +114,12 @@ void llvm::computeLTOCacheKey( auto AddUnsigned = [&](unsigned I) { uint8_t Data[4]; support::endian::write32le(Data, I); - Hasher.update(ArrayRef{Data, 4}); + Hasher.update(Data); }; auto AddUint64 = [&](uint64_t I) { uint8_t Data[8]; support::endian::write64le(Data, I); - Hasher.update(ArrayRef{Data, 8}); + Hasher.update(Data); }; AddString(Conf.CPU); // FIXME: Hash more of Options. For now all clients initialize Options from -- cgit v1.1