Hax0r around a deficiency in the Pass infrastructure

llvm-svn: 5555
This commit is contained in:
Chris Lattner 2003-02-13 21:44:18 +00:00
parent 32a8143e30
commit b178c26c20

View File

@ -19,7 +19,10 @@ namespace {
DSGraph *GlobalsGraph; // FIXME: Eliminate globals graph stuff from DNE
public:
Steens() : ResultGraph(0) {}
~Steens() { assert(ResultGraph == 0 && "releaseMemory not called?"); }
~Steens() {
releaseMyMemory();
assert(ResultGraph == 0 && "releaseMemory not called?");
}
//------------------------------------------------
// Implement the Pass API
@ -30,7 +33,7 @@ namespace {
//
bool run(Module &M);
virtual void releaseMemory() { delete ResultGraph; ResultGraph = 0; }
virtual void releaseMyMemory() { delete ResultGraph; ResultGraph = 0; }
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll(); // Does not transform code...