Now that Linker.cpp is almost empty, merge it into LinkModules.cpp.
authorRafael Espindola <rafael.espindola@gmail.com>
Sat, 4 May 2013 03:48:37 +0000 (03:48 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Sat, 4 May 2013 03:48:37 +0000 (03:48 +0000)
Also remove unused includes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181100 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Linker/CMakeLists.txt
lib/Linker/LinkModules.cpp
lib/Linker/Linker.cpp [deleted file]

index 28f1262a4398d40339aa92705feb2d4a9c5f5ce2..221b55a9c4066e7d2850f644f4430932c432a825 100644 (file)
@@ -1,4 +1,3 @@
 add_llvm_library(LLVMLinker
   LinkModules.cpp
-  Linker.cpp
   )
index 74cbdadd61eba980e69aa22c382beb5b8e9d5e94..161c269ef0a02eeccb7b58a5ad2aaa0a64f65880 100644 (file)
 
 #include "llvm/Linker.h"
 #include "llvm-c/Linker.h"
-#include "llvm/ADT/DenseSet.h"
 #include "llvm/ADT/Optional.h"
 #include "llvm/ADT/SetVector.h"
-#include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/ADT/SmallString.h"
 #include "llvm/IR/Constants.h"
-#include "llvm/IR/DerivedTypes.h"
-#include "llvm/IR/Instructions.h"
 #include "llvm/IR/Module.h"
 #include "llvm/IR/TypeFinder.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Transforms/Utils/Cloning.h"
-#include "llvm/Transforms/Utils/ValueMapper.h"
-#include <cctype>
 using namespace llvm;
 
 //===----------------------------------------------------------------------===//
@@ -1287,6 +1281,15 @@ bool ModuleLinker::run() {
   return false;
 }
 
+Linker::Linker(Module *M) : Composite(M) {}
+
+Linker::~Linker() {
+}
+
+bool Linker::linkInModule(Module *Src, unsigned Mode, std::string *ErrorMsg) {
+  return LinkModules(Composite, Src, Linker::DestroySource, ErrorMsg);
+}
+
 //===----------------------------------------------------------------------===//
 // LinkModules entrypoint.
 //===----------------------------------------------------------------------===//
diff --git a/lib/Linker/Linker.cpp b/lib/Linker/Linker.cpp
deleted file mode 100644 (file)
index 83c7160..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-//===- lib/Linker/Linker.cpp - Basic Linker functionality  ----------------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file contains basic Linker functionality that all usages will need.
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/Linker.h"
-#include "llvm/Bitcode/ReaderWriter.h"
-#include "llvm/IR/Module.h"
-#include "llvm/Support/MemoryBuffer.h"
-#include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/system_error.h"
-using namespace llvm;
-
-Linker::Linker(Module* aModule) :
-  Composite(aModule) { }
-
-Linker::~Linker() {
-}
-
-bool Linker::linkInModule(Module *Src, unsigned Mode, std::string *ErrorMsg) {
-  return LinkModules(Composite, Src, Linker::DestroySource, ErrorMsg);
-}