aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/LTO/LTO.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2024-04-26 18:38:15 -0700
committerGitHub <noreply@github.com>2024-04-26 18:38:15 -0700
commitd6bf04f4760b0dff3c3d3ff9b560c04438cc25ac (patch)
treeb87a4735765e05bf5df619618c5fa4db2f47127a /llvm/lib/LTO/LTO.cpp
parentde375fbc713b7c5cd0e3377a49f0773300203b63 (diff)
downloadllvm-d6bf04f4760b0dff3c3d3ff9b560c04438cc25ac.zip
llvm-d6bf04f4760b0dff3c3d3ff9b560c04438cc25ac.tar.gz
llvm-d6bf04f4760b0dff3c3d3ff9b560c04438cc25ac.tar.bz2
[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.
Diffstat (limited to 'llvm/lib/LTO/LTO.cpp')
-rw-r--r--llvm/lib/LTO/LTO.cpp4
1 files changed, 2 insertions, 2 deletions
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<uint8_t>{Data, 4});
+ Hasher.update(Data);
};
auto AddUint64 = [&](uint64_t I) {
uint8_t Data[8];
support::endian::write64le(Data, I);
- Hasher.update(ArrayRef<uint8_t>{Data, 8});
+ Hasher.update(Data);
};
AddString(Conf.CPU);
// FIXME: Hash more of Options. For now all clients initialize Options from