diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-01-18 16:17:27 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-01-18 16:17:27 +0000 |
commit | 67c32a98315f785a9ec9d531c1f571a0196c7463 (patch) | |
tree | 4abb9cbeecc7901726dd0b4a37369596c852e9ef /unittests/IR/DominatorTreeTest.cpp | |
parent | 9f61947910e6ab40de38e6b4034751ef1513200f (diff) |
Diffstat (limited to 'unittests/IR/DominatorTreeTest.cpp')
-rw-r--r-- | unittests/IR/DominatorTreeTest.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/unittests/IR/DominatorTreeTest.cpp b/unittests/IR/DominatorTreeTest.cpp index ab43d1c91fcd..6c43d6fe7c7b 100644 --- a/unittests/IR/DominatorTreeTest.cpp +++ b/unittests/IR/DominatorTreeTest.cpp @@ -186,8 +186,7 @@ namespace llvm { }; char DPass::ID = 0; - - Module* makeLLVMModule(DPass *P) { + std::unique_ptr<Module> makeLLVMModule(DPass *P) { const char *ModuleStrig = "declare i32 @g()\n" \ "define void @f(i32 %x) {\n" \ @@ -213,12 +212,12 @@ namespace llvm { "}\n"; LLVMContext &C = getGlobalContext(); SMDiagnostic Err; - return ParseAssemblyString(ModuleStrig, nullptr, Err, C); + return parseAssemblyString(ModuleStrig, Err, C); } TEST(DominatorTree, Unreachable) { DPass *P = new DPass(); - std::unique_ptr<Module> M(makeLLVMModule(P)); + std::unique_ptr<Module> M = makeLLVMModule(P); PassManager Passes; Passes.add(P); Passes.run(*M); |