[ELF] hash fn return type
authorNathan Sidwell <nathan@acm.org>
Fri, 14 Apr 2023 21:12:05 +0000 (17:12 -0400)
committerNathan Sidwell <nathan@acm.org>
Tue, 18 Apr 2023 22:19:55 +0000 (18:19 -0400)
Be explicit about the 32bitness of the return type.

Differential Revision: https://reviews.llvm.org/D148379

llvm/include/llvm/Object/ELF.h

index 9c5146f..2ae2e9f 100644 (file)
@@ -1236,7 +1236,7 @@ Expected<StringRef> ELFFile<ELFT>::getSectionName(const Elf_Shdr &Section,
 /// This function returns the hash value for a symbol in the .dynsym section
 /// Name of the API remains consistent as specified in the libelf
 /// REF : http://www.sco.com/developers/gabi/latest/ch5.dynamic.html#hash
-inline unsigned hashSysV(StringRef SymbolName) {
+inline uint32_t hashSysV(StringRef SymbolName) {
   uint32_t H = 0;
   for (uint8_t C : SymbolName) {
     H = (H << 4) + C;