Hash symbol names only once per global SymbolBody.
authorRafael Espindola <rafael.espindola@gmail.com>
Thu, 14 Apr 2016 19:17:16 +0000 (19:17 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Thu, 14 Apr 2016 19:17:16 +0000 (19:17 +0000)
commitc9157d35d9e4a82c92ed7942e8be58b67cb8da2b
tree468eda33cf30457fbaedcdfa4ea43bfbedf18ba8
parent000c5af3e65bcd32305d51a32ccdbe6fdf7d3fdf
Hash symbol names only once per global SymbolBody.

The DenseMap doesn't store hash results. This means that when it is
resized it has to recompute them.

This patch is a small hack that wraps the StringRef in a struct that
remembers the hash value. That way we can be sure it is only hashed
once.

llvm-svn: 266357
lld/ELF/MarkLive.cpp
lld/ELF/SymbolTable.h