aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Analysis/DSNode.h9
-rw-r--r--include/llvm/Analysis/DataStructure/DSNode.h9
2 files changed, 16 insertions, 2 deletions
diff --git a/include/llvm/Analysis/DSNode.h b/include/llvm/Analysis/DSNode.h
index 7d91918dba..f4d71d4030 100644
--- a/include/llvm/Analysis/DSNode.h
+++ b/include/llvm/Analysis/DSNode.h
@@ -9,6 +9,10 @@
#include "llvm/Analysis/DSSupport.h"
+#ifndef NDEBUG
+#define INCLUDE_PARENT_GRAPH 1
+#endif
+
template<typename BaseType>
class DSNodeIterator; // Data structure graph traversal iterator
@@ -37,9 +41,11 @@ class DSNode {
///
unsigned Size;
+#ifdef INCLUDE_PARENT_GRAPH
/// ParentGraph - The graph this node is currently embedded into.
///
DSGraph *ParentGraph;
+#endif
/// Ty - Keep track of the current outer most type of this object, in addition
/// to whether or not it has been indexed like an array or not. If the
@@ -124,9 +130,10 @@ public:
/// return the number of nodes forwarding over the node!
unsigned getNumReferrers() const { return NumReferrers; }
+#ifdef INCLUDE_PARENT_GRAPH
DSGraph *getParentGraph() const { return ParentGraph; }
void setParentGraph(DSGraph *G) { ParentGraph = G; }
-
+#endif
/// getForwardNode - This method returns the node that this node is forwarded
/// to, if any.
diff --git a/include/llvm/Analysis/DataStructure/DSNode.h b/include/llvm/Analysis/DataStructure/DSNode.h
index 7d91918dba..f4d71d4030 100644
--- a/include/llvm/Analysis/DataStructure/DSNode.h
+++ b/include/llvm/Analysis/DataStructure/DSNode.h
@@ -9,6 +9,10 @@
#include "llvm/Analysis/DSSupport.h"
+#ifndef NDEBUG
+#define INCLUDE_PARENT_GRAPH 1
+#endif
+
template<typename BaseType>
class DSNodeIterator; // Data structure graph traversal iterator
@@ -37,9 +41,11 @@ class DSNode {
///
unsigned Size;
+#ifdef INCLUDE_PARENT_GRAPH
/// ParentGraph - The graph this node is currently embedded into.
///
DSGraph *ParentGraph;
+#endif
/// Ty - Keep track of the current outer most type of this object, in addition
/// to whether or not it has been indexed like an array or not. If the
@@ -124,9 +130,10 @@ public:
/// return the number of nodes forwarding over the node!
unsigned getNumReferrers() const { return NumReferrers; }
+#ifdef INCLUDE_PARENT_GRAPH
DSGraph *getParentGraph() const { return ParentGraph; }
void setParentGraph(DSGraph *G) { ParentGraph = G; }
-
+#endif
/// getForwardNode - This method returns the node that this node is forwarded
/// to, if any.