diff options
-rw-r--r-- | lib/VMCore/PassManagerT.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/VMCore/PassManagerT.h b/lib/VMCore/PassManagerT.h index e88693f..4a2ad88 100644 --- a/lib/VMCore/PassManagerT.h +++ b/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); |