[PATCH] D148379: [elf] adjust sysv hash return type

Nathan Sidwell via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 14 14:24:38 PDT 2023


urnathan created this revision.
urnathan added reviewers: MaskRay, jhenderson.
Herald added a project: All.
urnathan requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

I didn't do this when fixing the hash function, but this seems a good thing to do -- and match the gnu hash fn too.


https://reviews.llvm.org/D148379

Files:
  llvm/include/llvm/Object/ELF.h


Index: llvm/include/llvm/Object/ELF.h
===================================================================
--- llvm/include/llvm/Object/ELF.h
+++ llvm/include/llvm/Object/ELF.h
@@ -1236,7 +1236,7 @@
 /// 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;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148379.513746.patch
Type: text/x-patch
Size: 594 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230414/ebb03ed4/attachment.bin>


More information about the llvm-commits mailing list