diff options
| author | Chris Lattner <sabre@nondot.org> | 2002-09-08 19:00:07 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2002-09-08 19:00:07 +0000 |
| commit | ed6504b1eb5e86933301c3c43e367060e4ca8824 (patch) | |
| tree | fa761f944bbb7b10130e83a64baf3d924be41fce /llvm/lib | |
| parent | 184b298edcf86613b6d5ba8efc4c6055351a7fcc (diff) | |
| download | bcm5719-llvm-ed6504b1eb5e86933301c3c43e367060e4ca8824.tar.gz bcm5719-llvm-ed6504b1eb5e86933301c3c43e367060e4ca8824.zip | |
Enable "garbage detection" of LLVM objects. Check for leaks after running
every pass.
llvm-svn: 3621
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/VMCore/PassManagerT.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/PassManagerT.h b/llvm/lib/VMCore/PassManagerT.h index e88693fbfff..4a2ad886714 100644 --- a/llvm/lib/VMCore/PassManagerT.h +++ b/llvm/lib/VMCore/PassManagerT.h @@ -17,6 +17,7 @@ #include "llvm/Pass.h" #include "Support/CommandLine.h" +#include "Support/LeakDetector.h" #include <algorithm> #include <iostream> class Annotable; @@ -217,6 +218,10 @@ public: endPass(P); MadeChanges |= Changed; + // Check for memory leaks by the pass... + LeakDetector::checkForGarbage(std::string("after running pass '") + + P->getPassName() + "'"); + if (Changed) PMDebug::PrintPassInformation(getDepth()+1, "Made Modification", P, (Annotable*)M); |

