diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2017-06-23 22:50:24 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2017-06-23 22:50:24 +0000 |
commit | f6242c3e90023baf746bca765f843e6c7f0d5660 (patch) | |
tree | 68ff7605825d9edd3a72d660f563e7ce22c90be0 /llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp | |
parent | 33d501f7d13c5d321ad3fce99b8e1c91becde075 (diff) | |
download | bcm5719-llvm-f6242c3e90023baf746bca765f843e6c7f0d5660.tar.gz bcm5719-llvm-f6242c3e90023baf746bca765f843e6c7f0d5660.zip |
This reverts commit r306166 and r306168.
Revert "[ORC] Remove redundant semicolons from DEFINE_SIMPLE_CONVERSION_FUNCTIONS uses."
Revert "[ORC] Move ORC IR layer interface from addModuleSet to addModule and fix the module type as std::shared_ptr<Module>."
They broke ExecutionEngine/OrcMCJIT/test-global-ctors.ll on linux.
llvm-svn: 306176
Diffstat (limited to 'llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp')
-rw-r--r-- | llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp b/llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp index 2900a9c9276..e8ba16a472b 100644 --- a/llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp +++ b/llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp @@ -65,9 +65,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())); - CCtx->H = LLVMOrcAddEagerlyCompiledIR(JITStack, SM, myResolver, nullptr); - LLVMOrcDisposeSharedModuleRef(SM); + CCtx->H = LLVMOrcAddEagerlyCompiledIR(JITStack, wrap(CCtx->M.get()), + myResolver, nullptr); CCtx->Compiled = true; LLVMOrcTargetAddress MainAddr = LLVMOrcGetSymbolAddress(JITStack, "main"); LLVMOrcSetIndirectStubPointer(JITStack, "foo", MainAddr); @@ -88,10 +87,8 @@ TEST_F(OrcCAPIExecutionTest, TestEagerIRCompilation) { LLVMOrcGetMangledSymbol(JIT, &testFuncName, "testFunc"); - LLVMSharedModuleRef SM = LLVMOrcMakeSharedModule(wrap(M.release())); LLVMOrcModuleHandle H = - LLVMOrcAddEagerlyCompiledIR(JIT, SM, myResolver, nullptr); - LLVMOrcDisposeSharedModuleRef(SM); + LLVMOrcAddEagerlyCompiledIR(JIT, wrap(M.get()), myResolver, nullptr); MainFnTy MainFn = (MainFnTy)LLVMOrcGetSymbolAddress(JIT, "main"); int Result = MainFn(); EXPECT_EQ(Result, 42) @@ -114,10 +111,8 @@ TEST_F(OrcCAPIExecutionTest, TestLazyIRCompilation) { LLVMOrcGetMangledSymbol(JIT, &testFuncName, "testFunc"); - LLVMSharedModuleRef SM = LLVMOrcMakeSharedModule(wrap(M.release())); LLVMOrcModuleHandle H = - LLVMOrcAddLazilyCompiledIR(JIT, SM, myResolver, nullptr); - LLVMOrcDisposeSharedModuleRef(SM); + LLVMOrcAddLazilyCompiledIR(JIT, wrap(M.get()), myResolver, nullptr); MainFnTy MainFn = (MainFnTy)LLVMOrcGetSymbolAddress(JIT, "main"); int Result = MainFn(); EXPECT_EQ(Result, 42) |