From 9c2c05d70e84a8de4f2756c11b6d19d5c67ab527 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Sat, 19 Dec 2015 21:42:07 +0000 Subject: [PATCH] Delete APIs that have been deprecated since 2010. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256107 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/ReleaseNotes.rst | 4 ++ include/llvm-c/ExecutionEngine.h | 24 ----------- .../ExecutionEngineBindings.cpp | 42 ------------------- 3 files changed, 4 insertions(+), 66 deletions(-) diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst index 5d526b10baf..8b33b6bc23b 100644 --- a/docs/ReleaseNotes.rst +++ b/docs/ReleaseNotes.rst @@ -58,6 +58,10 @@ Non-comprehensive list of changes in this release * The deprecated C APIs LLVMGetBitcodeModuleProviderInContext and LLVMGetBitcodeModuleProvider have been removed. +* The deprecated C APIs LLVMCreateExecutionEngine, LLVMCreateInterpreter, + LLVMCreateJITCompiler, LLVMAddModuleProvider and LLVMRemoveModuleProvider + have been removed. + * With this release, the C API headers have been reorganized to improve build time. Type specific declarations have been moved to Type.h, and error handling routines have been moved to ErrorHandling.h. Both are included in diff --git a/include/llvm-c/ExecutionEngine.h b/include/llvm-c/ExecutionEngine.h index 6b000fa0d6f..b72a91a8b13 100644 --- a/include/llvm-c/ExecutionEngine.h +++ b/include/llvm-c/ExecutionEngine.h @@ -110,22 +110,6 @@ LLVMBool LLVMCreateMCJITCompilerForModule( struct LLVMMCJITCompilerOptions *Options, size_t SizeOfOptions, char **OutError); -/** Deprecated: Use LLVMCreateExecutionEngineForModule instead. */ -LLVMBool LLVMCreateExecutionEngine(LLVMExecutionEngineRef *OutEE, - LLVMModuleProviderRef MP, - char **OutError); - -/** Deprecated: Use LLVMCreateInterpreterForModule instead. */ -LLVMBool LLVMCreateInterpreter(LLVMExecutionEngineRef *OutInterp, - LLVMModuleProviderRef MP, - char **OutError); - -/** Deprecated: Use LLVMCreateJITCompilerForModule instead. */ -LLVMBool LLVMCreateJITCompiler(LLVMExecutionEngineRef *OutJIT, - LLVMModuleProviderRef MP, - unsigned OptLevel, - char **OutError); - void LLVMDisposeExecutionEngine(LLVMExecutionEngineRef EE); void LLVMRunStaticConstructors(LLVMExecutionEngineRef EE); @@ -144,17 +128,9 @@ void LLVMFreeMachineCodeForFunction(LLVMExecutionEngineRef EE, LLVMValueRef F); void LLVMAddModule(LLVMExecutionEngineRef EE, LLVMModuleRef M); -/** Deprecated: Use LLVMAddModule instead. */ -void LLVMAddModuleProvider(LLVMExecutionEngineRef EE, LLVMModuleProviderRef MP); - LLVMBool LLVMRemoveModule(LLVMExecutionEngineRef EE, LLVMModuleRef M, LLVMModuleRef *OutMod, char **OutError); -/** Deprecated: Use LLVMRemoveModule instead. */ -LLVMBool LLVMRemoveModuleProvider(LLVMExecutionEngineRef EE, - LLVMModuleProviderRef MP, - LLVMModuleRef *OutMod, char **OutError); - LLVMBool LLVMFindFunction(LLVMExecutionEngineRef EE, const char *Name, LLVMValueRef *OutFn); diff --git a/lib/ExecutionEngine/ExecutionEngineBindings.cpp b/lib/ExecutionEngine/ExecutionEngineBindings.cpp index f7aba4cec04..ff7c4dce0d5 100644 --- a/lib/ExecutionEngine/ExecutionEngineBindings.cpp +++ b/lib/ExecutionEngine/ExecutionEngineBindings.cpp @@ -210,35 +210,6 @@ LLVMBool LLVMCreateMCJITCompilerForModule( return 1; } -LLVMBool LLVMCreateExecutionEngine(LLVMExecutionEngineRef *OutEE, - LLVMModuleProviderRef MP, - char **OutError) { - /* The module provider is now actually a module. */ - return LLVMCreateExecutionEngineForModule(OutEE, - reinterpret_cast(MP), - OutError); -} - -LLVMBool LLVMCreateInterpreter(LLVMExecutionEngineRef *OutInterp, - LLVMModuleProviderRef MP, - char **OutError) { - /* The module provider is now actually a module. */ - return LLVMCreateInterpreterForModule(OutInterp, - reinterpret_cast(MP), - OutError); -} - -LLVMBool LLVMCreateJITCompiler(LLVMExecutionEngineRef *OutJIT, - LLVMModuleProviderRef MP, - unsigned OptLevel, - char **OutError) { - /* The module provider is now actually a module. */ - return LLVMCreateJITCompilerForModule(OutJIT, - reinterpret_cast(MP), - OptLevel, OutError); -} - - void LLVMDisposeExecutionEngine(LLVMExecutionEngineRef EE) { delete unwrap(EE); } @@ -282,11 +253,6 @@ void LLVMAddModule(LLVMExecutionEngineRef EE, LLVMModuleRef M){ unwrap(EE)->addModule(std::unique_ptr(unwrap(M))); } -void LLVMAddModuleProvider(LLVMExecutionEngineRef EE, LLVMModuleProviderRef MP){ - /* The module provider is now actually a module. */ - LLVMAddModule(EE, reinterpret_cast(MP)); -} - LLVMBool LLVMRemoveModule(LLVMExecutionEngineRef EE, LLVMModuleRef M, LLVMModuleRef *OutMod, char **OutError) { Module *Mod = unwrap(M); @@ -295,14 +261,6 @@ LLVMBool LLVMRemoveModule(LLVMExecutionEngineRef EE, LLVMModuleRef M, return 0; } -LLVMBool LLVMRemoveModuleProvider(LLVMExecutionEngineRef EE, - LLVMModuleProviderRef MP, - LLVMModuleRef *OutMod, char **OutError) { - /* The module provider is now actually a module. */ - return LLVMRemoveModule(EE, reinterpret_cast(MP), OutMod, - OutError); -} - LLVMBool LLVMFindFunction(LLVMExecutionEngineRef EE, const char *Name, LLVMValueRef *OutFn) { if (Function *F = unwrap(EE)->FindFunctionNamed(Name)) { -- 2.34.1