Index: ELF/SyntheticSections.h =================================================================== --- ELF/SyntheticSections.h +++ ELF/SyntheticSections.h @@ -684,7 +684,8 @@ }; struct NameAttrEntry { - llvm::CachedHashStringRef Name; + const char *Name; + uint32_t NameHash; uint32_t CuIndexAndAttrs; }; Index: ELF/SyntheticSections.cpp =================================================================== --- ELF/SyntheticSections.cpp +++ ELF/SyntheticSections.cpp @@ -2433,7 +2433,7 @@ while (I < CUs.size() && CUs[I].CuOffset < Set.Offset) ++I; for (const DWARFDebugPubTable::Entry &Ent : Set.Entries) - Ret.push_back({{Ent.Name, computeGdbHash(Ent.Name)}, + Ret.push_back({Ent.Name.data(), computeGdbHash(Ent.Name), (Ent.Descriptor.toBits() << 24) | I}); } } @@ -2475,19 +2475,20 @@ uint32_t I = 0; for (ArrayRef Entries : NameAttrs) { for (const NameAttrEntry &Ent : Entries) { - size_t ShardId = Ent.Name.hash() >> Shift; + size_t ShardId = Ent.NameHash >> Shift; if ((ShardId & (Concurrency - 1)) != ThreadId) continue; + CachedHashStringRef Name(Ent.Name, Ent.NameHash); uint32_t V = Ent.CuIndexAndAttrs + CuIdxs[I]; - size_t &Idx = Map[ShardId][Ent.Name]; + size_t &Idx = Map[ShardId][Name]; if (Idx) { Symbols[ShardId][Idx - 1].CuVector.push_back(V); continue; } Idx = Symbols[ShardId].size() + 1; - Symbols[ShardId].push_back({Ent.Name, {V}, 0, 0}); + Symbols[ShardId].push_back({Name, {V}, 0, 0}); } ++I; }