summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Writer.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2016-12-19 03:14:16 +0000
committerRui Ueyama <ruiu@google.com>2016-12-19 03:14:16 +0000
commit8f687f71fb03147db3f752f55465bd7ac639fb8c (patch)
treee9f63d4943c46cfead0ce1db28d1d3142264ec4a /lld/ELF/Writer.cpp
parentadb58e7598595c337d42b5636d78a8115ee4ef18 (diff)
downloadbcm5719-llvm-8f687f71fb03147db3f752f55465bd7ac639fb8c.tar.gz
bcm5719-llvm-8f687f71fb03147db3f752f55465bd7ac639fb8c.zip
Remove inappropriate use of CachedHashStringRef.
Use of CachedHashStringRef makes sense only when we reuse hash values. Sprinkling it to all DenseMap has no benefits and just complicates data types. Basically we shouldn't use CachedHashStringRef unless there is a strong reason to to do so. llvm-svn: 290076
Diffstat (limited to 'lld/ELF/Writer.cpp')
-rw-r--r--lld/ELF/Writer.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index e8d517d211d..4c03e891030 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -770,8 +770,7 @@ static void sortBySymbolsOrder(ArrayRef<OutputSectionBase *> V) {
auto *D = dyn_cast<DefinedRegular<ELFT>>(Body);
if (!D || !D->Section)
continue;
- auto It =
- Config->SymbolOrderingFile.find(CachedHashString(Body->getName()));
+ auto It = Config->SymbolOrderingFile.find(Body->getName());
if (It == Config->SymbolOrderingFile.end())
continue;
@@ -782,7 +781,7 @@ static void sortBySymbolsOrder(ArrayRef<OutputSectionBase *> V) {
}
for (OutputSectionBase *Base : V)
- if (OutputSection<ELFT> *Sec = dyn_cast<OutputSection<ELFT>>(Base))
+ if (auto *Sec = dyn_cast<OutputSection<ELFT>>(Base))
Sec->sort([&](InputSection<ELFT> *S) {
auto It = SectionsOrder.find(S);
return It == SectionsOrder.end() ? UINT32_MAX : It->second;
OpenPOWER on IntegriCloud