1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

Fix unit tests for LLVMContext+Module.

llvm-svn: 74622
This commit is contained in:
Owen Anderson 2009-07-01 18:14:20 +00:00
parent 29ea777c1e
commit a2b98c3a6e
2 changed files with 6 additions and 4 deletions

View File

@ -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))) {
}

View File

@ -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");