diff options
author | Rui Ueyama <ruiu@google.com> | 2017-05-24 18:22:27 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2017-05-24 18:22:27 +0000 |
commit | 740034c606e2fd9acbe94ba2aa006165a7461d38 (patch) | |
tree | ef788ea0445e726b8dafc666fa71899cc30f4405 /lld/ELF/SymbolTable.h | |
parent | d35084dcf6adafc9dcd74da15c8d58d7a6afc496 (diff) |
Simplify a variable type by using StringRef instead of CachedHashStringRef.
A variable `ComdatGroup` is not supposed to contain a large number of
items. Even when linking clang, it ends up having only 300K strings.
It doesn't make sense to use CachedHashStringRef for this hash table.
This patch has neutral or slightly positive impact on performance while
reducing code complexity.
Diffstat (limited to 'lld/ELF/SymbolTable.h')
-rw-r--r-- | lld/ELF/SymbolTable.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/ELF/SymbolTable.h b/lld/ELF/SymbolTable.h index 1a745f9deea..2f39e98e4a6 100644 --- a/lld/ELF/SymbolTable.h +++ b/lld/ELF/SymbolTable.h @@ -117,7 +117,7 @@ private: // Comdat groups define "link once" sections. If two comdat groups have the // same name, only one of them is linked, and the other is ignored. This set // is used to uniquify them. - llvm::DenseSet<llvm::CachedHashStringRef> ComdatGroups; + llvm::DenseSet<StringRef> ComdatGroups; std::vector<ObjectFile<ELFT> *> ObjectFiles; std::vector<SharedFile<ELFT> *> SharedFiles; |