summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/Config.h3
-rw-r--r--lld/ELF/Driver.cpp2
-rw-r--r--lld/ELF/InputSection.h1
-rw-r--r--lld/ELF/Writer.cpp5
4 files changed, 5 insertions, 6 deletions
diff --git a/lld/ELF/Config.h b/lld/ELF/Config.h
index 890e33afbab..d8e78e0e25c 100644
--- a/lld/ELF/Config.h
+++ b/lld/ELF/Config.h
@@ -10,7 +10,6 @@
#ifndef LLD_ELF_CONFIG_H
#define LLD_ELF_CONFIG_H
-#include "llvm/ADT/CachedHashString.h"
#include "llvm/ADT/MapVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/ELF.h"
@@ -72,7 +71,7 @@ struct VersionDefinition {
struct Configuration {
InputFile *FirstElf = nullptr;
uint8_t OSABI = 0;
- llvm::DenseMap<llvm::CachedHashStringRef, unsigned> SymbolOrderingFile;
+ llvm::DenseMap<llvm::StringRef, unsigned> SymbolOrderingFile;
llvm::StringMap<uint64_t> SectionStartMap;
llvm::StringRef DynamicLinker;
llvm::StringRef Entry;
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index 521b6182e28..935da5dacc3 100644
--- a/lld/ELF/Driver.cpp
+++ b/lld/ELF/Driver.cpp
@@ -487,7 +487,7 @@ static void parseSymbolOrderingList(MemoryBufferRef MB) {
SmallVector<StringRef, 0> Arr;
MB.getBuffer().split(Arr, '\n');
for (StringRef S : Arr)
- Config->SymbolOrderingFile.insert({CachedHashStringRef(S.trim()), I++});
+ Config->SymbolOrderingFile.insert({S.trim(), I++});
}
// Initializes Config members by the command line options.
diff --git a/lld/ELF/InputSection.h b/lld/ELF/InputSection.h
index 617ad7b4ba4..af22254ad05 100644
--- a/lld/ELF/InputSection.h
+++ b/lld/ELF/InputSection.h
@@ -14,6 +14,7 @@
#include "Relocations.h"
#include "Thunks.h"
#include "lld/Core/LLVM.h"
+#include "llvm/ADT/CachedHashString.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/TinyPtrVector.h"
#include "llvm/Object/ELF.h"
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