Index: include/lld/ReaderWriter/Utils.h =================================================================== --- include/lld/ReaderWriter/Utils.h (revision 0) +++ include/lld/ReaderWriter/Utils.h (working copy) @@ -0,0 +1,14 @@ +#include "llvm/ADT/StringExtras.h" + +namespace lld { + struct StringRefMapInfo { + static StringRef getEmptyKey() { return StringRef(); } + static StringRef getTombstoneKey() { return StringRef(" ", 0); } + static unsigned getHashValue(StringRef const val) { + return llvm::HashString(val); + } + static bool isEqual(StringRef const lhs, StringRef const rhs) { + return lhs.equals(rhs); + } + }; +} Index: lib/ReaderWriter/FileArchive.cpp =================================================================== --- lib/ReaderWriter/FileArchive.cpp (revision 232608) +++ lib/ReaderWriter/FileArchive.cpp (working copy) @@ -11,6 +11,7 @@ #include "lld/Core/LLVM.h" #include "lld/Core/LinkingContext.h" #include "lld/Core/Parallel.h" +#include "lld/ReaderWriter/Utils.h" #include "llvm/ADT/Hashing.h" #include "llvm/ADT/StringRef.h" #include "llvm/Object/Archive.h" @@ -243,7 +244,8 @@ return std::error_code(); } - typedef std::unordered_map MemberMap; + typedef llvm::DenseMap MemberMap; typedef std::set InstantiatedSet; std::shared_ptr _mb;