diff options
| -rw-r--r-- | lld/ELF/SyntheticSections.cpp | 10 | 
1 files changed, 2 insertions, 8 deletions
diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp index 04a0f5514f3..906fce8c8e2 100644 --- a/lld/ELF/SyntheticSections.cpp +++ b/lld/ELF/SyntheticSections.cpp @@ -359,18 +359,12 @@ void BuildIdSection<ELFT>::writeBuildId(ArrayRef<uint8_t> Buf) {      break;    case BuildIdKind::Md5:      computeHash(Buf, [](uint8_t *Dest, ArrayRef<uint8_t> Arr) { -      MD5 Hash; -      Hash.update(Arr); -      MD5::MD5Result Res; -      Hash.final(Res); -      memcpy(Dest, Res, 16); +      memcpy(Dest, MD5::hash(Arr).data(), 16);      });      break;    case BuildIdKind::Sha1:      computeHash(Buf, [](uint8_t *Dest, ArrayRef<uint8_t> Arr) { -      SHA1 Hash; -      Hash.update(Arr); -      memcpy(Dest, Hash.final().data(), 20); +      memcpy(Dest, SHA1::hash(Arr).data(), 20);      });      break;    case BuildIdKind::Uuid:  | 

