[lld] r338409 - Simplify. NFC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 31 11:13:36 PDT 2018
Author: ruiu
Date: Tue Jul 31 11:13:36 2018
New Revision: 338409
URL: http://llvm.org/viewvc/llvm-project?rev=338409&view=rev
Log:
Simplify. NFC.
Modified:
lld/trunk/ELF/InputSection.cpp
lld/trunk/ELF/SyntheticSections.cpp
Modified: lld/trunk/ELF/InputSection.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.cpp?rev=338409&r1=338408&r2=338409&view=diff
==============================================================================
--- lld/trunk/ELF/InputSection.cpp (original)
+++ lld/trunk/ELF/InputSection.cpp Tue Jul 31 11:13:36 2018
@@ -1071,8 +1071,7 @@ void MergeInputSection::splitNonStrings(
bool IsAlloc = Flags & SHF_ALLOC;
for (size_t I = 0; I != Size; I += EntSize)
- Pieces.emplace_back(I, xxHash64(toStringRef(Data.slice(I, EntSize))),
- !IsAlloc);
+ Pieces.emplace_back(I, xxHash64(Data.slice(I, EntSize)), !IsAlloc);
}
template <class ELFT>
Modified: lld/trunk/ELF/SyntheticSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SyntheticSections.cpp?rev=338409&r1=338408&r2=338409&view=diff
==============================================================================
--- lld/trunk/ELF/SyntheticSections.cpp (original)
+++ lld/trunk/ELF/SyntheticSections.cpp Tue Jul 31 11:13:36 2018
@@ -335,7 +335,7 @@ void BuildIdSection::writeBuildId(ArrayR
switch (Config->BuildId) {
case BuildIdKind::Fast:
computeHash(Buf, [](uint8_t *Dest, ArrayRef<uint8_t> Arr) {
- write64le(Dest, xxHash64(toStringRef(Arr)));
+ write64le(Dest, xxHash64(Arr));
});
break;
case BuildIdKind::Md5:
More information about the llvm-commits
mailing list