Index: lld/trunk/ELF/SyntheticSections.h =================================================================== --- lld/trunk/ELF/SyntheticSections.h +++ lld/trunk/ELF/SyntheticSections.h @@ -103,7 +103,8 @@ std::vector CieRecords; // CIE records are uniquified by their contents and personality functions. - llvm::DenseMap, SymbolBody *>, CieRecord> CieMap; + llvm::DenseMap, SymbolBody *>, CieRecord *> + CieMap; }; class GotSection : public SyntheticSection { Index: lld/trunk/ELF/SyntheticSections.cpp =================================================================== --- lld/trunk/ELF/SyntheticSections.cpp +++ lld/trunk/ELF/SyntheticSections.cpp @@ -417,10 +417,11 @@ &Sec->template getFile()->getRelocTargetSym(Rels[FirstRelI]); // Search for an existing CIE by CIE contents/relocation target pair. - CieRecord *Rec = &CieMap[{Cie.data(), Personality}]; + CieRecord *&Rec = CieMap[{Cie.data(), Personality}]; // If not found, create a new one. - if (Rec->Cie == nullptr) { + if (!Rec) { + Rec = make(); Rec->Cie = &Cie; CieRecords.push_back(Rec); }