1 //===- lib/Linker/Linker.cpp - Basic Linker functionality ----------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains basic Linker functionality that all usages will need.
12 //===----------------------------------------------------------------------===//
14 #include "llvm/Linker.h"
15 #include "llvm/Bitcode/ReaderWriter.h"
16 #include "llvm/IR/Module.h"
17 #include "llvm/Support/MemoryBuffer.h"
18 #include "llvm/Support/raw_ostream.h"
19 #include "llvm/Support/system_error.h"
22 Linker::Linker(StringRef modname,
25 Composite(new Module(modname, C)) { }
27 Linker::Linker(Module* aModule) :
28 Context(aModule->getContext()),
29 Composite(aModule) { }