summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ExecutionEngine
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/ExecutionEngine')
-rw-r--r--llvm/unittests/ExecutionEngine/MCJIT/MCJITObjectCacheTest.cpp4
-rw-r--r--llvm/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/llvm/unittests/ExecutionEngine/MCJIT/MCJITObjectCacheTest.cpp b/llvm/unittests/ExecutionEngine/MCJIT/MCJITObjectCacheTest.cpp
index 2736383bb75..2e38dd88b0f 100644
--- a/llvm/unittests/ExecutionEngine/MCJIT/MCJITObjectCacheTest.cpp
+++ b/llvm/unittests/ExecutionEngine/MCJIT/MCJITObjectCacheTest.cpp
@@ -163,7 +163,7 @@ TEST_F(MCJITObjectCacheTest, VerifyLoadFromCache) {
TheJIT.reset();
// Create a new memory manager.
- MM = new SectionMemoryManager;
+ MM.reset(new SectionMemoryManager());
// Create a new module and save it. Use a different return code so we can
// tell if MCJIT compiled this module or used the cache.
@@ -197,7 +197,7 @@ TEST_F(MCJITObjectCacheTest, VerifyNonLoadFromCache) {
TheJIT.reset();
// Create a new memory manager.
- MM = new SectionMemoryManager;
+ MM.reset(new SectionMemoryManager());
// Create a new module and save it. Use a different return code so we can
// tell if MCJIT compiled this module or used the cache. Note that we use
diff --git a/llvm/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h b/llvm/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h
index eea88bbe3f4..35af417bf14 100644
--- a/llvm/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h
+++ b/llvm/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h
@@ -325,7 +325,7 @@ protected:
EngineBuilder EB(std::move(M));
std::string Error;
TheJIT.reset(EB.setEngineKind(EngineKind::JIT)
- .setMCJITMemoryManager(MM)
+ .setMCJITMemoryManager(std::move(MM))
.setErrorStr(&Error)
.setOptLevel(CodeGenOpt::None)
.setCodeModel(CodeModel::JITDefault)
@@ -344,7 +344,7 @@ protected:
StringRef MArch;
SmallVector<std::string, 1> MAttrs;
std::unique_ptr<ExecutionEngine> TheJIT;
- RTDyldMemoryManager *MM;
+ std::unique_ptr<RTDyldMemoryManager> MM;
std::unique_ptr<Module> M;
};
OpenPOWER on IntegriCloud