mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 17:24:48 +00:00
Make it explicit that ExecutionEngine takes ownership of the modules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215967 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -114,7 +114,7 @@ protected:
|
||||
TEST_F(MCJITObjectCacheTest, SetNullObjectCache) {
|
||||
SKIP_UNSUPPORTED_PLATFORM;
|
||||
|
||||
createJIT(M.release());
|
||||
createJIT(std::move(M));
|
||||
|
||||
TheJIT->setObjectCache(nullptr);
|
||||
|
||||
@ -130,7 +130,7 @@ TEST_F(MCJITObjectCacheTest, VerifyBasicObjectCaching) {
|
||||
// Save a copy of the module pointer before handing it off to MCJIT.
|
||||
const Module * SavedModulePointer = M.get();
|
||||
|
||||
createJIT(M.release());
|
||||
createJIT(std::move(M));
|
||||
|
||||
TheJIT->setObjectCache(Cache.get());
|
||||
|
||||
@ -157,7 +157,7 @@ TEST_F(MCJITObjectCacheTest, VerifyLoadFromCache) {
|
||||
std::unique_ptr<TestObjectCache> Cache(new TestObjectCache);
|
||||
|
||||
// Compile this module with an MCJIT engine
|
||||
createJIT(M.release());
|
||||
createJIT(std::move(M));
|
||||
TheJIT->setObjectCache(Cache.get());
|
||||
TheJIT->finalizeObject();
|
||||
|
||||
@ -174,7 +174,7 @@ TEST_F(MCJITObjectCacheTest, VerifyLoadFromCache) {
|
||||
const Module * SecondModulePointer = M.get();
|
||||
|
||||
// Create a new MCJIT instance to load this module then execute it.
|
||||
createJIT(M.release());
|
||||
createJIT(std::move(M));
|
||||
TheJIT->setObjectCache(Cache.get());
|
||||
compileAndRun();
|
||||
|
||||
@ -191,7 +191,7 @@ TEST_F(MCJITObjectCacheTest, VerifyNonLoadFromCache) {
|
||||
std::unique_ptr<TestObjectCache> Cache(new TestObjectCache);
|
||||
|
||||
// Compile this module with an MCJIT engine
|
||||
createJIT(M.release());
|
||||
createJIT(std::move(M));
|
||||
TheJIT->setObjectCache(Cache.get());
|
||||
TheJIT->finalizeObject();
|
||||
|
||||
@ -209,7 +209,7 @@ TEST_F(MCJITObjectCacheTest, VerifyNonLoadFromCache) {
|
||||
const Module * SecondModulePointer = M.get();
|
||||
|
||||
// Create a new MCJIT instance to load this module then execute it.
|
||||
createJIT(M.release());
|
||||
createJIT(std::move(M));
|
||||
TheJIT->setObjectCache(Cache.get());
|
||||
|
||||
// Verify that our object cache does not contain the module yet.
|
||||
|
Reference in New Issue
Block a user