Skip to content

Commit

Permalink
[ELF] hash fn return type
Browse files Browse the repository at this point in the history
Be explicit about the 32bitness of the return type.

Differential Revision: https://reviews.llvm.org/D148379
  • Loading branch information
urnathan committed Apr 18, 2023
1 parent 3c8757a commit 4aeb127
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/include/llvm/Object/ELF.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4aeb127

Please sign in to comment.