projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1bd1e6d
)
Remove the last memory leak from the VMCore unit tests.
author
Jeffrey Yasskin
<jyasskin@google.com>
Sat, 13 Mar 2010 02:15:08 +0000
(
02:15
+0000)
committer
Jeffrey Yasskin
<jyasskin@google.com>
Sat, 13 Mar 2010 02:15:08 +0000
(
02:15
+0000)
Tested: valgrind --leak-check=full unittests/VMCore/Debug/VMCoreTests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98414
91177308
-0d34-0410-b5e6-
96231b3b80d8
unittests/VMCore/PassManagerTest.cpp
patch
|
blob
|
history
diff --git
a/unittests/VMCore/PassManagerTest.cpp
b/unittests/VMCore/PassManagerTest.cpp
index cb8f9ebb939beb4dafaf373d25226f9a9d1313f2..bc21298ef20053c79915fbeab8295a93f51145f3 100644
(file)
--- a/
unittests/VMCore/PassManagerTest.cpp
+++ b/
unittests/VMCore/PassManagerTest.cpp
@@
-324,10
+324,10
@@
namespace llvm {
template<typename T>
void MemoryTestHelper(int run) {
-
Module *M = makeLLVMModule(
);
+
OwningPtr<Module> M(makeLLVMModule()
);
T *P = new T();
PassManager Passes;
- Passes.add(new TargetData(M));
+ Passes.add(new TargetData(M
.get()
));
Passes.add(P);
Passes.run(*M);
T::finishedOK(run);