aboutsummaryrefslogtreecommitdiffstats
path: root/unittests/IR
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2013-01-23 08:33:13 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2013-01-23 08:33:13 +0000
commit023d97d70305dfe5a1a24659496ef95dc6bf3d39 (patch)
treea0b50793f2812f4e8e74141df606cd08484254dc /unittests/IR
parentd422e9f114ec11073a63e0fa9ecbfe3aeedf0fbb (diff)
downloadexternal_llvm-023d97d70305dfe5a1a24659496ef95dc6bf3d39.zip
external_llvm-023d97d70305dfe5a1a24659496ef95dc6bf3d39.tar.gz
external_llvm-023d97d70305dfe5a1a24659496ef95dc6bf3d39.tar.bz2
llvm/unittests: Use OwningPtr to fix --vg-leak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173240 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/IR')
-rw-r--r--unittests/IR/ConstantsTest.cpp2
-rw-r--r--unittests/IR/DominatorTreeTest.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/unittests/IR/ConstantsTest.cpp b/unittests/IR/ConstantsTest.cpp
index 5c739cd..fee38b8 100644
--- a/unittests/IR/ConstantsTest.cpp
+++ b/unittests/IR/ConstantsTest.cpp
@@ -162,7 +162,7 @@ TEST(ConstantsTest, PointerCast) {
}
TEST(ConstantsTest, AsInstructionsTest) {
- Module *M = new Module("MyModule", getGlobalContext());
+ OwningPtr<Module> M(new Module("MyModule", getGlobalContext()));
Type *Int64Ty = Type::getInt64Ty(getGlobalContext());
Type *Int32Ty = Type::getInt32Ty(getGlobalContext());
diff --git a/unittests/IR/DominatorTreeTest.cpp b/unittests/IR/DominatorTreeTest.cpp
index a378f2c..4e5af93 100644
--- a/unittests/IR/DominatorTreeTest.cpp
+++ b/unittests/IR/DominatorTreeTest.cpp
@@ -191,7 +191,7 @@ namespace llvm {
TEST(DominatorTree, Unreachable) {
DPass *P = new DPass();
- Module *M = makeLLVMModule(P);
+ OwningPtr<Module> M(makeLLVMModule(P));
PassManager Passes;
Passes.add(P);
Passes.run(*M);