1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

[ELF] dont compute symbolname size in every loop

llvm-svn: 177903
This commit is contained in:
Shankar Easwaran 2013-03-25 20:26:47 +00:00
parent 55bb6cadfc
commit db949a1507

View File

@ -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)