From c7c35a9b8692ca7ac7a6b4b3f46ddb234ae159c7 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Sat, 4 May 2013 03:48:37 +0000 Subject: Now that Linker.cpp is almost empty, merge it into LinkModules.cpp. Also remove unused includes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181100 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Linker/LinkModules.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'lib/Linker/LinkModules.cpp') diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp index 74cbdadd61..161c269ef0 100644 --- a/lib/Linker/LinkModules.cpp +++ b/lib/Linker/LinkModules.cpp @@ -13,21 +13,15 @@ #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 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. //===----------------------------------------------------------------------===// -- cgit v1.2.3