mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 00:32:55 +00:00
[ELF] dont compute symbolname size in every loop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177903 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7f7f6a8da4
commit
dceaf4ac8d
@ -2709,7 +2709,7 @@ static inline error_code GetELFSymbolVersion(const ObjectFile *Obj,
|
||||
/// REF : http://www.sco.com/developers/gabi/latest/ch5.dynamic.html#hash
|
||||
static inline unsigned elf_hash(StringRef &symbolName) {
|
||||
unsigned h = 0, g;
|
||||
for (unsigned i = 0; i < symbolName.size(); i++) {
|
||||
for (unsigned i = 0, j = symbolName.size(); i < j; i++) {
|
||||
h = (h << 4) + symbolName[i];
|
||||
g = h & 0xf0000000L;
|
||||
if (g != 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user