diff options
author | Shankar Easwaran <shankare@codeaurora.org> | 2013-03-25 20:26:47 +0000 |
---|---|---|
committer | Shankar Easwaran <shankare@codeaurora.org> | 2013-03-25 20:26:47 +0000 |
commit | dceaf4ac8dcb2167b57853d354760fe9a8cb8273 (patch) | |
tree | e327029c0057ef801458fb434b8a57714ae17ae3 /include | |
parent | 7f7f6a8da456a822d5bc6a048d96ac8c53935587 (diff) | |
download | external_llvm-dceaf4ac8dcb2167b57853d354760fe9a8cb8273.zip external_llvm-dceaf4ac8dcb2167b57853d354760fe9a8cb8273.tar.gz external_llvm-dceaf4ac8dcb2167b57853d354760fe9a8cb8273.tar.bz2 |
[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
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Object/ELF.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/Object/ELF.h b/include/llvm/Object/ELF.h index 1a4496d..b2488ac 100644 --- a/include/llvm/Object/ELF.h +++ b/include/llvm/Object/ELF.h @@ -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) |