diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp index 19c87028f1c0..45befa6a99a3 100644 --- a/lld/COFF/Driver.cpp +++ b/lld/COFF/Driver.cpp @@ -81,6 +81,7 @@ bool link(ArrayRef<const char *> Args, bool CanExitEarly, raw_ostream &Diag) { ObjFile::Instances.clear(); ImportFile::Instances.clear(); BitcodeFile::Instances.clear(); + memset(MergeChunk::Instances, 0, sizeof(MergeChunk::Instances)); return !errorCount(); }