diff options
Diffstat (limited to 'llvm/unittests/ExecutionEngine')
-rw-r--r-- | llvm/unittests/ExecutionEngine/Orc/ObjectTransformLayerTest.cpp | 3 | ||||
-rw-r--r-- | llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp | 13 |
2 files changed, 6 insertions, 10 deletions
diff --git a/llvm/unittests/ExecutionEngine/Orc/ObjectTransformLayerTest.cpp b/llvm/unittests/ExecutionEngine/Orc/ObjectTransformLayerTest.cpp index 3d0ee365f1c..eacd3e0b0f9 100644 --- a/llvm/unittests/ExecutionEngine/Orc/ObjectTransformLayerTest.cpp +++ b/llvm/unittests/ExecutionEngine/Orc/ObjectTransformLayerTest.cpp @@ -14,6 +14,7 @@ #include "llvm/ExecutionEngine/Orc/NullResolver.h" #include "llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h" #include "llvm/ExecutionEngine/SectionMemoryManager.h" +#include "llvm/IR/Module.h" #include "llvm/Object/ObjectFile.h" #include "gtest/gtest.h" @@ -302,7 +303,7 @@ TEST(ObjectTransformLayerTest, Main) { // Make sure that the calls from IRCompileLayer to ObjectTransformLayer // compile. cantFail(CompileLayer.addModule(ES.allocateVModule(), - std::shared_ptr<llvm::Module>())); + std::unique_ptr<llvm::Module>())); // Make sure that the calls from ObjectTransformLayer to ObjectLinkingLayer // compile. diff --git a/llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp b/llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp index ca445b4d4e1..f053407a478 100644 --- a/llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp +++ b/llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp @@ -73,9 +73,8 @@ protected: CompileContext *CCtx = static_cast<CompileContext*>(Ctx); auto *ET = CCtx->APIExecTest; CCtx->M = ET->createTestModule(ET->TM->getTargetTriple()); - LLVMSharedModuleRef SM = LLVMOrcMakeSharedModule(wrap(CCtx->M.release())); - LLVMOrcAddEagerlyCompiledIR(JITStack, &CCtx->H, SM, myResolver, nullptr); - LLVMOrcDisposeSharedModuleRef(SM); + LLVMOrcAddEagerlyCompiledIR(JITStack, &CCtx->H, wrap(CCtx->M.release()), + myResolver, nullptr); CCtx->Compiled = true; LLVMOrcTargetAddress MainAddr; LLVMOrcGetSymbolAddress(JITStack, &MainAddr, "main"); @@ -97,10 +96,8 @@ TEST_F(OrcCAPIExecutionTest, TestEagerIRCompilation) { LLVMOrcGetMangledSymbol(JIT, &testFuncName, "testFunc"); - LLVMSharedModuleRef SM = LLVMOrcMakeSharedModule(wrap(M.release())); LLVMOrcModuleHandle H; - LLVMOrcAddEagerlyCompiledIR(JIT, &H, SM, myResolver, nullptr); - LLVMOrcDisposeSharedModuleRef(SM); + LLVMOrcAddEagerlyCompiledIR(JIT, &H, wrap(M.release()), myResolver, nullptr); LLVMOrcTargetAddress MainAddr; LLVMOrcGetSymbolAddress(JIT, &MainAddr, "main"); MainFnTy MainFn = (MainFnTy)MainAddr; @@ -125,10 +122,8 @@ TEST_F(OrcCAPIExecutionTest, TestLazyIRCompilation) { LLVMOrcGetMangledSymbol(JIT, &testFuncName, "testFunc"); - LLVMSharedModuleRef SM = LLVMOrcMakeSharedModule(wrap(M.release())); LLVMOrcModuleHandle H; - LLVMOrcAddLazilyCompiledIR(JIT, &H, SM, myResolver, nullptr); - LLVMOrcDisposeSharedModuleRef(SM); + LLVMOrcAddLazilyCompiledIR(JIT, &H, wrap(M.release()), myResolver, nullptr); LLVMOrcTargetAddress MainAddr; LLVMOrcGetSymbolAddress(JIT, &MainAddr, "main"); MainFnTy MainFn = (MainFnTy)MainAddr; |