[llvm-commits] [llvm] r98414 - /llvm/trunk/unittests/VMCore/PassManagerTest.cpp
Jeffrey Yasskin
jyasskin at google.com
Fri Mar 12 18:15:08 PST 2010
Author: jyasskin
Date: Fri Mar 12 20:15:08 2010
New Revision: 98414
URL: http://llvm.org/viewvc/llvm-project?rev=98414&view=rev
Log:
Remove the last memory leak from the VMCore unit tests.
Tested: valgrind --leak-check=full unittests/VMCore/Debug/VMCoreTests
Modified:
llvm/trunk/unittests/VMCore/PassManagerTest.cpp
Modified: llvm/trunk/unittests/VMCore/PassManagerTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/VMCore/PassManagerTest.cpp?rev=98414&r1=98413&r2=98414&view=diff
==============================================================================
--- llvm/trunk/unittests/VMCore/PassManagerTest.cpp (original)
+++ llvm/trunk/unittests/VMCore/PassManagerTest.cpp Fri Mar 12 20:15:08 2010
@@ -324,10 +324,10 @@
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);
More information about the llvm-commits
mailing list