diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2016-02-12 15:28:45 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2016-02-12 15:28:45 +0000 |
commit | cbc31d699b75b6d14ac50117386814270cd6a859 (patch) | |
tree | fbf4863da9a3a48650b9bfca492328b880575ea4 /llvm/lib/Linker/LinkModules.cpp | |
parent | 397eb7b0b39b8cee689c991e31be42da936f7d59 (diff) | |
download | bcm5719-llvm-cbc31d699b75b6d14ac50117386814270cd6a859.tar.gz bcm5719-llvm-cbc31d699b75b6d14ac50117386814270cd6a859.zip |
Delete the deprecated LLVMLinkModules.
llvm-svn: 260683
Diffstat (limited to 'llvm/lib/Linker/LinkModules.cpp')
-rw-r--r-- | llvm/lib/Linker/LinkModules.cpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp index b96a6f42705..f17d5371b0e 100644 --- a/llvm/lib/Linker/LinkModules.cpp +++ b/llvm/lib/Linker/LinkModules.cpp @@ -557,11 +557,6 @@ bool Linker::linkInModule(std::unique_ptr<Module> Src, unsigned Flags, return ModLinker.run(); } -bool Linker::linkInModuleForCAPI(Module &Src) { - ModuleLinker ModLinker(Mover, Src, 0, nullptr, nullptr); - return ModLinker.run(); -} - bool Linker::linkInMetadata(Module &Src, DenseMap<unsigned, MDNode *> *ValIDToTempMDMap) { SetVector<GlobalValue *> ValuesToLink; @@ -592,35 +587,6 @@ bool Linker::linkModules(Module &Dest, std::unique_ptr<Module> Src, // C API. //===----------------------------------------------------------------------===// -static void diagnosticHandler(const DiagnosticInfo &DI, void *C) { - auto *Message = reinterpret_cast<std::string *>(C); - raw_string_ostream Stream(*Message); - DiagnosticPrinterRawOStream DP(Stream); - DI.print(DP); -} - -LLVMBool LLVMLinkModules(LLVMModuleRef Dest, LLVMModuleRef Src, - LLVMLinkerMode Unused, char **OutMessages) { - Module *D = unwrap(Dest); - LLVMContext &Ctx = D->getContext(); - - LLVMContext::DiagnosticHandlerTy OldDiagnosticHandler = - Ctx.getDiagnosticHandler(); - void *OldDiagnosticContext = Ctx.getDiagnosticContext(); - std::string Message; - Ctx.setDiagnosticHandler(diagnosticHandler, &Message, true); - - Linker L(*D); - Module *M = unwrap(Src); - LLVMBool Result = L.linkInModuleForCAPI(*M); - - Ctx.setDiagnosticHandler(OldDiagnosticHandler, OldDiagnosticContext, true); - - if (OutMessages && Result) - *OutMessages = strdup(Message.c_str()); - return Result; -} - LLVMBool LLVMLinkModules2(LLVMModuleRef Dest, LLVMModuleRef Src) { Module *D = unwrap(Dest); std::unique_ptr<Module> M(unwrap(Src)); |