diff --git a/lld/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp b/lld/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp index 55552c1ed16c..ff3236c056d6 100644 --- a/lld/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp +++ b/lld/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp @@ -264,7 +264,7 @@ void PECOFFLinkingContext::addDllExport(ExportDesc &desc) { return; } _dllExports.push_back(desc); - _dllExportSet.insert(desc.name); + _dllExportSet.insert(_dllExports.back().name); } void PECOFFLinkingContext::addPasses(PassManager &pm) {