every pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3621
91177308-0d34-0410-b5e6-
96231b3b80d8
#include "llvm/Pass.h"
#include "Support/CommandLine.h"
+#include "Support/LeakDetector.h"
#include <algorithm>
#include <iostream>
class Annotable;
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);