[llvm] 4aeb127 - [ELF] hash fn return type
Nathan Sidwell via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 18 15:20:42 PDT 2023
Author: Nathan Sidwell
Date: 2023-04-18T18:19:55-04:00
New Revision: 4aeb12794bb7f37603b5e3de6f36566e33e8e3ad
URL: https://github.com/llvm/llvm-project/commit/4aeb12794bb7f37603b5e3de6f36566e33e8e3ad
DIFF: https://github.com/llvm/llvm-project/commit/4aeb12794bb7f37603b5e3de6f36566e33e8e3ad.diff
LOG: [ELF] hash fn return type
Be explicit about the 32bitness of the return type.
Differential Revision: https://reviews.llvm.org/D148379
Added:
Modified:
llvm/include/llvm/Object/ELF.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Object/ELF.h b/llvm/include/llvm/Object/ELF.h
index 9c5146f014958..2ae2e9fbdf354 100644
--- a/llvm/include/llvm/Object/ELF.h
+++ b/llvm/include/llvm/Object/ELF.h
@@ -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;
More information about the llvm-commits
mailing list