diff options
author | Derek Schuff <dschuff@chromium.org> | 2013-01-09 16:55:43 -0800 |
---|---|---|
committer | Derek Schuff <dschuff@chromium.org> | 2013-01-11 13:47:37 -0800 |
commit | b770d0e0636a4b5ad61b1ca661caee67576c05fc (patch) | |
tree | c486ce032d41f97313c50629bd5b879f53e6ccbf /lib/Linker | |
parent | b835840cf112a6178506d834b58aa625f59a8994 (diff) | |
parent | 1ad9253c9d34ccbce3e7e4ea5d87c266cbf93410 (diff) |
Merge commit '1ad9253c9d34ccbce3e7e4ea5d87c266cbf93410'
deplib features commented out due to removal upstream;
will add back as a localmod
Conflicts:
include/llvm/ADT/Triple.h
include/llvm/MC/MCAssembler.h
include/llvm/Target/TargetFrameLowering.h
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
lib/CodeGen/AsmPrinter/DwarfDebug.h
lib/CodeGen/BranchFolding.cpp
lib/LLVMBuild.txt
lib/Linker/LinkArchives.cpp
lib/MC/MCAssembler.cpp
lib/MC/MCELFStreamer.cpp
lib/Makefile
lib/Target/ARM/ARMExpandPseudoInsts.cpp
lib/Target/ARM/ARMFrameLowering.cpp
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMSubtarget.h
lib/Target/ARM/ARMTargetObjectFile.cpp
lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
lib/Target/Mips/MipsInstrFPU.td
lib/Target/Mips/MipsInstrInfo.td
lib/Target/X86/X86CodeEmitter.cpp
lib/Target/X86/X86Subtarget.h
lib/VMCore/Module.cpp
test/MC/MachO/ARM/nop-armv4-padding.s
tools/Makefile
tools/llc/llc.cpp
tools/lto/LTOModule.cpp
tools/lto/lto.cpp
Diffstat (limited to 'lib/Linker')
-rw-r--r-- | lib/Linker/LinkArchives.cpp | 3 | ||||
-rw-r--r-- | lib/Linker/LinkItems.cpp | 29 | ||||
-rw-r--r-- | lib/Linker/LinkModules.cpp | 25 | ||||
-rw-r--r-- | lib/Linker/Linker.cpp | 4 |
4 files changed, 11 insertions, 50 deletions
diff --git a/lib/Linker/LinkArchives.cpp b/lib/Linker/LinkArchives.cpp index c5656a54c9..9d5e5b5c80 100644 --- a/lib/Linker/LinkArchives.cpp +++ b/lib/Linker/LinkArchives.cpp @@ -13,10 +13,9 @@ //===----------------------------------------------------------------------===// #include "llvm/Linker.h" -#include "llvm/Module.h" #include "llvm/ADT/SetOperations.h" #include "llvm/Bitcode/Archive.h" - +#include "llvm/Module.h" #include "llvm/Support/CommandLine.h" // @LOCALMOD #include <memory> diff --git a/lib/Linker/LinkItems.cpp b/lib/Linker/LinkItems.cpp index 52a0d175a5..124e5e4e4d 100644 --- a/lib/Linker/LinkItems.cpp +++ b/lib/Linker/LinkItems.cpp @@ -13,11 +13,11 @@ //===----------------------------------------------------------------------===// #include "llvm/Linker.h" -#include "llvm/Module.h" #include "llvm/Bitcode/ReaderWriter.h" -#include "llvm/Support/Path.h" +#include "llvm/Module.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/MemoryBuffer.h" +#include "llvm/Support/Path.h" #include "llvm/Support/system_error.h" using namespace llvm; @@ -51,20 +51,6 @@ Linker::LinkInItems(const ItemList& Items, ItemList& NativeItems) { } } - // At this point we have processed all the link items provided to us. Since - // we have an aggregated module at this point, the dependent libraries in - // that module should also be aggregated with duplicates eliminated. This is - // now the time to process the dependent libraries to resolve any remaining - // symbols. - bool is_native; - for (Module::lib_iterator I = Composite->lib_begin(), - E = Composite->lib_end(); I != E; ++I) { - if(LinkInLibrary(*I, is_native)) - return true; - if (is_native) - NativeItems.push_back(std::make_pair(*I, true)); - } - return false; } @@ -128,17 +114,6 @@ bool Linker::LinkInLibraries(const std::vector<std::string> &Libraries) { if (LinkInLibrary(Libraries[i], is_native)) return true; - // At this point we have processed all the libraries provided to us. Since - // we have an aggregated module at this point, the dependent libraries in - // that module should also be aggregated with duplicates eliminated. This is - // now the time to process the dependent libraries to resolve any remaining - // symbols. - const Module::LibraryListType& DepLibs = Composite->getLibraries(); - for (Module::LibraryListType::const_iterator I = DepLibs.begin(), - E = DepLibs.end(); I != E; ++I) - if (LinkInLibrary(*I, is_native)) - return true; - return false; } diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp index b3426fb19f..6554d9c429 100644 --- a/lib/Linker/LinkModules.cpp +++ b/lib/Linker/LinkModules.cpp @@ -12,21 +12,21 @@ //===----------------------------------------------------------------------===// #include "llvm/Linker.h" -#include "llvm/Constants.h" -#include "llvm/DerivedTypes.h" -#include "llvm/Instructions.h" -#include "llvm/Module.h" -#include "llvm/TypeFinder.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/Constants.h" +#include "llvm/DerivedTypes.h" +#include "llvm/Instructions.h" +#include "llvm/Module.h" #include "llvm/Support/Debug.h" #include "llvm/Support/Path.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Transforms/Utils/Cloning.h" #include "llvm/Transforms/Utils/ValueMapper.h" -#include "llvm-c/Linker.h" +#include "llvm/TypeFinder.h" #include <cctype> using namespace llvm; @@ -1207,19 +1207,6 @@ bool ModuleLinker::run() { SrcM->getModuleInlineAsm()); } - // Update the destination module's dependent libraries list with the libraries - // from the source module. There's no opportunity for duplicates here as the - // Module ensures that duplicate insertions are discarded. - for (Module::lib_iterator SI = SrcM->lib_begin(), SE = SrcM->lib_end(); - SI != SE; ++SI) - DstM->addLibrary(*SI); - - // If the source library's module id is in the dependent library list of the - // destination library, remove it since that module is now linked in. - StringRef ModuleId = SrcM->getModuleIdentifier(); - if (!ModuleId.empty()) - DstM->removeLibrary(sys::path::stem(ModuleId)); - // Loop over all of the linked values to compute type mappings. computeTypeMapping(); diff --git a/lib/Linker/Linker.cpp b/lib/Linker/Linker.cpp index 7c6cf4f3dd..ffe79d29c1 100644 --- a/lib/Linker/Linker.cpp +++ b/lib/Linker/Linker.cpp @@ -12,10 +12,10 @@ //===----------------------------------------------------------------------===// #include "llvm/Linker.h" -#include "llvm/Module.h" #include "llvm/Bitcode/ReaderWriter.h" -#include "llvm/Support/Path.h" +#include "llvm/Module.h" #include "llvm/Support/MemoryBuffer.h" +#include "llvm/Support/Path.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Support/system_error.h" using namespace llvm; |