Skip to content

Commit d6bf04f

Browse files
[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.
1 parent de375fb commit d6bf04f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/LTO/LTO.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,12 @@ void llvm::computeLTOCacheKey(
114114
auto AddUnsigned = [&](unsigned I) {
115115
uint8_t Data[4];
116116
support::endian::write32le(Data, I);
117-
Hasher.update(ArrayRef<uint8_t>{Data, 4});
117+
Hasher.update(Data);
118118
};
119119
auto AddUint64 = [&](uint64_t I) {
120120
uint8_t Data[8];
121121
support::endian::write64le(Data, I);
122-
Hasher.update(ArrayRef<uint8_t>{Data, 8});
122+
Hasher.update(Data);
123123
};
124124
AddString(Conf.CPU);
125125
// FIXME: Hash more of Options. For now all clients initialize Options from

0 commit comments

Comments
 (0)