[PATCH] D14672: COFF: Destroy LTOModules as they are linked.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 17 15:33:45 PST 2015


This revision was automatically updated to reflect the committed changes.
Closed by commit rL253397: COFF: Destroy LTOModules as they are linked. (authored by pcc).

Changed prior to commit:
  http://reviews.llvm.org/D14672?vs=40195&id=40444#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D14672

Files:
  lld/trunk/COFF/InputFiles.h
  lld/trunk/COFF/SymbolTable.cpp

Index: lld/trunk/COFF/InputFiles.h
===================================================================
--- lld/trunk/COFF/InputFiles.h
+++ lld/trunk/COFF/InputFiles.h
@@ -205,7 +205,6 @@
   std::vector<SymbolBody *> &getSymbols() override { return SymbolBodies; }
   MachineTypes getMachineType() override;
 
-  LTOModule *getModule() const { return M.get(); }
   std::unique_ptr<LTOModule> takeModule() { return std::move(M); }
 
 private:
Index: lld/trunk/COFF/SymbolTable.cpp
===================================================================
--- lld/trunk/COFF/SymbolTable.cpp
+++ lld/trunk/COFF/SymbolTable.cpp
@@ -406,7 +406,7 @@
 
   CG->setModule(BitcodeFiles[0]->takeModule());
   for (unsigned I = 1, E = BitcodeFiles.size(); I != E; ++I)
-    CG->addModule(BitcodeFiles[I]->getModule());
+    CG->addModule(BitcodeFiles[I]->takeModule().get());
 
   bool DisableVerify = true;
 #ifdef NDEBUG


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14672.40444.patch
Type: text/x-patch
Size: 904 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151117/e1f950e9/attachment.bin>


More information about the llvm-commits mailing list