Hax0r around a deficiency in the Pass infrastructure
authorChris Lattner <sabre@nondot.org>
Thu, 13 Feb 2003 21:44:18 +0000 (21:44 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 13 Feb 2003 21:44:18 +0000 (21:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5555 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/DataStructure/Steensgaard.cpp

index bd6a7e932a3ff2a25e6a0cc2be0a214d2183b8e0..94b63d77a6158d85427d53d6194f9d7a1121b390 100644 (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...