diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-01 18:14:20 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-01 18:14:20 +0000 |
commit | 0b19bb76db13c89752cd308d21cb7203325039e8 (patch) | |
tree | 60148037bec914c03eb54bed09e1c4fe4dd4c00d | |
parent | ed1c0ffe0b2287deaee7cba7506c93aa34c6d4b7 (diff) | |
download | external_llvm-0b19bb76db13c89752cd308d21cb7203325039e8.zip external_llvm-0b19bb76db13c89752cd308d21cb7203325039e8.tar.gz external_llvm-0b19bb76db13c89752cd308d21cb7203325039e8.tar.bz2 |
Fix unit tests for LLVMContext+Module.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74622 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp | 3 | ||||
-rw-r--r-- | unittests/VMCore/PassManagerTest.cpp | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp b/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp index 3c9beeb..1bcf0ab 100644 --- a/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp +++ b/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp @@ -9,6 +9,7 @@ #include "llvm/ExecutionEngine/JITEventListener.h" +#include "llvm/LLVMContext.h" #include "llvm/Instructions.h" #include "llvm/Module.h" #include "llvm/ModuleProvider.h" @@ -64,7 +65,7 @@ struct RecordingJITEventListener : public JITEventListener { class JITEventListenerTest : public testing::Test { protected: JITEventListenerTest() - : M(new Module("module")), + : 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 6909ac0..fb26d52 100644 --- a/unittests/VMCore/PassManagerTest.cpp +++ b/unittests/VMCore/PassManagerTest.cpp @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// #include "llvm/Module.h" +#include "llvm/LLVMContext.h" #include "llvm/PassManager.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/Pass.h" @@ -271,7 +272,7 @@ namespace llvm { char OnTheFlyTest::ID=0; TEST(PassManager, RunOnce) { - Module M("test-once"); + Module M("test-once", new LLVMContext()); struct ModuleNDNM *mNDNM = new ModuleNDNM(); struct ModuleDNM *mDNM = new ModuleDNM(); struct ModuleNDM *mNDM = new ModuleNDM(); @@ -295,7 +296,7 @@ namespace llvm { } TEST(PassManager, ReRun) { - Module M("test-rerun"); + Module M("test-rerun", new LLVMContext()); struct ModuleNDNM *mNDNM = new ModuleNDNM(); struct ModuleDNM *mDNM = new ModuleDNM(); struct ModuleNDM *mNDM = new ModuleNDM(); @@ -386,7 +387,7 @@ namespace llvm { Module* makeLLVMModule() { // Module Construction - Module* mod = new Module("test-mem"); + 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"); |