Shadow nodes don't need to know their explicit parent, they just need to
authorChris Lattner <sabre@nondot.org>
Mon, 1 Apr 2002 00:12:36 +0000 (00:12 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 1 Apr 2002 00:12:36 +0000 (00:12 +0000)
know what type to be.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2080 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/DataStructure.h
include/llvm/Analysis/DataStructure/DataStructure.h

index edb0ac5d10903ba88da4a175aff63890bc2724af..3dce04321ab450227927d6c96e14a6691c16c2a7 100644 (file)
@@ -343,13 +343,12 @@ private:
 //
 class ShadowDSNode : public DSNode {
   friend class FunctionDSGraph;
-  DSNode *Parent;
   Module *Mod;
   ShadowDSNode *ShadowParent;   // Nonnull if this is a synthesized node...
   std::vector<std::pair<const Type *, ShadowDSNode *> > SynthNodes;
   bool CriticalNode;
 public:
-  ShadowDSNode(DSNode *Parent, Module *M, bool Critical = false);
+  ShadowDSNode(const Type *Ty, Module *M, bool Critical = false);
   virtual std::string getCaption() const;
 
   // synthesizeNode - Create a new shadow node that is to be linked into this
@@ -376,7 +375,7 @@ protected:
     if (ShadowParent)
       return new ShadowDSNode(getType(), Mod, ShadowParent);
     else
-      return new ShadowDSNode(Parent, Mod, CriticalNode);
+      return new ShadowDSNode(getType(), Mod, CriticalNode);
   }
 };
 
index edb0ac5d10903ba88da4a175aff63890bc2724af..3dce04321ab450227927d6c96e14a6691c16c2a7 100644 (file)
@@ -343,13 +343,12 @@ private:
 //
 class ShadowDSNode : public DSNode {
   friend class FunctionDSGraph;
-  DSNode *Parent;
   Module *Mod;
   ShadowDSNode *ShadowParent;   // Nonnull if this is a synthesized node...
   std::vector<std::pair<const Type *, ShadowDSNode *> > SynthNodes;
   bool CriticalNode;
 public:
-  ShadowDSNode(DSNode *Parent, Module *M, bool Critical = false);
+  ShadowDSNode(const Type *Ty, Module *M, bool Critical = false);
   virtual std::string getCaption() const;
 
   // synthesizeNode - Create a new shadow node that is to be linked into this
@@ -376,7 +375,7 @@ protected:
     if (ShadowParent)
       return new ShadowDSNode(getType(), Mod, ShadowParent);
     else
-      return new ShadowDSNode(Parent, Mod, CriticalNode);
+      return new ShadowDSNode(getType(), Mod, CriticalNode);
   }
 };