[PATCH] D70378: [LLD][COFF] Fix missing cache cleanup in COFF::link()

Erik McClure via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 2 22:43:37 PST 2019


blackhole12 updated this revision to Diff 231826.
blackhole12 added a comment.

Update with full context


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70378/new/

https://reviews.llvm.org/D70378

Files:
  lld/COFF/DebugTypes.cpp
  lld/COFF/Writer.cpp


Index: lld/COFF/Writer.cpp
===================================================================
--- lld/COFF/Writer.cpp
+++ lld/COFF/Writer.cpp
@@ -586,6 +586,7 @@
 
 // The main function of the writer.
 void Writer::run() {
+  outputSections.clear();
   ScopedTimer t1(codeLayoutTimer);
 
   createImportTables();
Index: lld/COFF/DebugTypes.cpp
===================================================================
--- lld/COFF/DebugTypes.cpp
+++ lld/COFF/DebugTypes.cpp
@@ -233,6 +233,7 @@
 // debug info will simply be missing from the final PDB - that is the default
 // accepted behavior.
 void loadTypeServerSource(llvm::MemoryBufferRef m) {
+  TypeServerSource::instances.clear();
   std::string path = normalizePdbPath(m.getBufferIdentifier());
 
   Expected<TypeServerSource *> ts = TypeServerSource::getInstance(m);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70378.231826.patch
Type: text/x-patch
Size: 823 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191203/5fd49ec0/attachment.bin>


More information about the llvm-commits mailing list