diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2009-10-14 17:57:32 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2009-10-14 17:57:32 +0000 |
commit | cd749a9c07f1de2fb8affde90537efa4bc3e7c54 (patch) | |
tree | b21f6de4e08b89bb7931806bab798fc2a5e3a686 /unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp | |
parent | 72621d11de5b873f1695f391eb95f0b336c3d2d4 (diff) | |
download | FreeBSD-src-cd749a9c07f1de2fb8affde90537efa4bc3e7c54.zip FreeBSD-src-cd749a9c07f1de2fb8affde90537efa4bc3e7c54.tar.gz |
Update llvm to r84119.
Diffstat (limited to 'unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp')
-rw-r--r-- | unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp b/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp index 1007ae1..87e3280 100644 --- a/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp +++ b/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp @@ -65,8 +65,10 @@ struct RecordingJITEventListener : public JITEventListener { class JITEventListenerTest : public testing::Test { protected: JITEventListenerTest() - : M(new Module("module", *new LLVMContext())), - EE(ExecutionEngine::createJIT(new ExistingModuleProvider(M))) { + : M(new Module("module", getGlobalContext())), + EE(EngineBuilder(M) + .setEngineKind(EngineKind::JIT) + .create()) { } Module *M; @@ -75,11 +77,11 @@ class JITEventListenerTest : public testing::Test { Function *buildFunction(Module *M) { Function *Result = Function::Create( - TypeBuilder<int32_t(int32_t), false>::get(), + TypeBuilder<int32_t(int32_t), false>::get(getGlobalContext()), GlobalValue::ExternalLinkage, "id", M); Value *Arg = Result->arg_begin(); - BasicBlock *BB = BasicBlock::Create("entry", Result); - ReturnInst::Create(Arg, BB); + BasicBlock *BB = BasicBlock::Create(M->getContext(), "entry", Result); + ReturnInst::Create(M->getContext(), Arg, BB); return Result; } @@ -232,7 +234,7 @@ TEST_F(JITEventListenerTest, MatchesMachineCodeInfo) { class JITEnvironment : public testing::Environment { virtual void SetUp() { - // Required for ExecutionEngine::createJIT to create a JIT. + // Required to create a JIT. InitializeNativeTarget(); } }; |