Fix some null checks to actually test the part that needs checking.
[oota-llvm.git] / include / llvm / Analysis / ET-Forest.h
index be9df98e26b3377aaaf34c93b4e794625a16e250..8bd5e447bca6db63e5c5712e377776a6a667cbff 100644 (file)
@@ -141,6 +141,7 @@ public:
   // removeFromForest()
   ~ETNode() {
     delete RightmostOcc;
+    delete ParentOcc;
   }
 
   void removeFromForest() {
@@ -274,6 +275,14 @@ public:
     return DFSNumOut;
   }
 
+  const ETNode *getSon() const {
+    return Son;
+  }
+  
+  const ETNode *getBrother() const {
+    return Left;
+  }
+
  private:
   // Data represented by the node
   void *data;