summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ExecutionEngine/MCJIT
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2014-12-03 00:51:19 +0000
committerLang Hames <lhames@gmail.com>2014-12-03 00:51:19 +0000
commit4a5697e659a29cf258708097d65a9882b2598958 (patch)
tree654dc24e6461f496f465d7e15a150a9d24cdf1a1 /llvm/unittests/ExecutionEngine/MCJIT
parent01fa7701e6ddaba68ed9e093c9cb637138cc2698 (diff)
downloadbcm5719-llvm-4a5697e659a29cf258708097d65a9882b2598958.tar.gz
bcm5719-llvm-4a5697e659a29cf258708097d65a9882b2598958.zip
[MCJIT] Unique-ptrify the RTDyldMemoryManager member of MCJIT. NFC.
llvm-svn: 223183
Diffstat (limited to 'llvm/unittests/ExecutionEngine/MCJIT')
-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