[llvm-commits] CVS: llvm/lib/VMCore/PassManagerT.h
Christopher Lattner
lattner at cs.uiuc.edu
Sun Sep 8 14:01:01 PDT 2002
Changes in directory llvm/lib/VMCore:
PassManagerT.h updated: 1.25 -> 1.26
---
Log message:
Enable "garbage detection" of LLVM objects. Check for leaks after running
every pass.
---
Diffs of the changes:
Index: llvm/lib/VMCore/PassManagerT.h
diff -u llvm/lib/VMCore/PassManagerT.h:1.25 llvm/lib/VMCore/PassManagerT.h:1.26
--- llvm/lib/VMCore/PassManagerT.h:1.25 Fri Aug 30 15:25:01 2002
+++ llvm/lib/VMCore/PassManagerT.h Sun Sep 8 14:00:07 2002
@@ -17,6 +17,7 @@
#include "llvm/Pass.h"
#include "Support/CommandLine.h"
+#include "Support/LeakDetector.h"
#include <algorithm>
#include <iostream>
class Annotable;
@@ -216,6 +217,10 @@
bool Changed = runPass(P, M);
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,
More information about the llvm-commits
mailing list