Enable "garbage detection" of LLVM objects. Check for leaks after running
every pass. llvm-svn: 3621
This commit is contained in:
parent
184b298edc
commit
ed6504b1eb
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue