Delete dead code.
[oota-llvm.git] / lib / Linker / LinkModules.cpp
index c57c70e322abb93dbe3bee6d59f184593d0f7a35..7ba622f6ee1d34460cabb9380a2d71e710f299bf 100644 (file)
@@ -2032,7 +2032,7 @@ bool Linker::IdentifiedStructTypeSet::hasType(StructType *Ty) {
   return *I == Ty;
 }
 
-void Linker::init(Module *M, DiagnosticHandlerFunction DiagnosticHandler) {
+Linker::Linker(Module *M, DiagnosticHandlerFunction DiagnosticHandler) {
   this->Composite = M;
   this->DiagnosticHandler = DiagnosticHandler;
 
@@ -2046,20 +2046,10 @@ void Linker::init(Module *M, DiagnosticHandlerFunction DiagnosticHandler) {
   }
 }
 
-Linker::Linker(Module *M, DiagnosticHandlerFunction DiagnosticHandler) {
-  init(M, DiagnosticHandler);
-}
-
-Linker::Linker(Module *M) {
-  init(M, [this](const DiagnosticInfo &DI) {
-    Composite->getContext().diagnose(DI);
-  });
-}
-
-void Linker::deleteModule() {
-  delete Composite;
-  Composite = nullptr;
-}
+Linker::Linker(Module *M)
+    : Linker(M, [this](const DiagnosticInfo &DI) {
+        Composite->getContext().diagnose(DI);
+      }) {}
 
 bool Linker::linkInModule(Module *Src, unsigned Flags,
                           const FunctionInfoIndex *Index,