diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-01 21:22:36 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-01 21:22:36 +0000 |
commit | a148fdd8312c060c65bacf8fe61a6db5b2add6a5 (patch) | |
tree | 9e5f714db4af7dddfab061cb0016489f6d114c56 /unittests | |
parent | a0619e843be1fcf8fba618ed93207cf5db42cc26 (diff) | |
download | external_llvm-a148fdd8312c060c65bacf8fe61a6db5b2add6a5.zip external_llvm-a148fdd8312c060c65bacf8fe61a6db5b2add6a5.tar.gz external_llvm-a148fdd8312c060c65bacf8fe61a6db5b2add6a5.tar.bz2 |
Hold the LLVMContext by reference rather than by pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74640 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp | 2 | ||||
-rw-r--r-- | unittests/VMCore/PassManagerTest.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp b/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp index 1bcf0ab..1007ae1 100644 --- a/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp +++ b/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp @@ -65,7 +65,7 @@ struct RecordingJITEventListener : public JITEventListener { class JITEventListenerTest : public testing::Test { protected: JITEventListenerTest() - : M(new Module("module", new LLVMContext())), + : M(new Module("module", *new LLVMContext())), EE(ExecutionEngine::createJIT(new ExistingModuleProvider(M))) { } diff --git a/unittests/VMCore/PassManagerTest.cpp b/unittests/VMCore/PassManagerTest.cpp index fb26d52..8122e2c 100644 --- a/unittests/VMCore/PassManagerTest.cpp +++ b/unittests/VMCore/PassManagerTest.cpp @@ -272,7 +272,7 @@ namespace llvm { char OnTheFlyTest::ID=0; TEST(PassManager, RunOnce) { - Module M("test-once", new LLVMContext()); + Module M("test-once", *new LLVMContext()); struct ModuleNDNM *mNDNM = new ModuleNDNM(); struct ModuleDNM *mDNM = new ModuleDNM(); struct ModuleNDM *mNDM = new ModuleNDM(); @@ -296,7 +296,7 @@ namespace llvm { } TEST(PassManager, ReRun) { - Module M("test-rerun", new LLVMContext()); + Module M("test-rerun", *new LLVMContext()); struct ModuleNDNM *mNDNM = new ModuleNDNM(); struct ModuleDNM *mDNM = new ModuleDNM(); struct ModuleNDM *mNDM = new ModuleNDM(); @@ -387,7 +387,7 @@ namespace llvm { Module* makeLLVMModule() { // Module Construction - Module* mod = new Module("test-mem", new LLVMContext()); + Module* mod = new Module("test-mem", *new LLVMContext()); mod->setDataLayout("e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-" "i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-" "a0:0:64-s0:64:64-f80:128:128"); |