aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2007-06-12 05:49:31 +0000
committerDevang Patel <dpatel@apple.com>2007-06-12 05:49:31 +0000
commit9c7ee6b19fab7a269994264bc19bf4d19c33b3c3 (patch)
tree76fbf6cb6eea3b6cc416066ae0e82a8551f3cd08
parent7706d23399dd7f987c1452ef59468c59827abd79 (diff)
Make DFS number manipulation methods private.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37553 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Analysis/Dominators.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h
index 34d027d03b..a7f5fcbaae 100644
--- a/include/llvm/Analysis/Dominators.h
+++ b/include/llvm/Analysis/Dominators.h
@@ -59,13 +59,16 @@ public:
//===----------------------------------------------------------------------===//
// DomTreeNode - Dominator Tree Node
-
+class DominatorTreeBase;
+class PostDominatorTree;
class DomTreeNode {
BasicBlock *TheBB;
DomTreeNode *IDom;
std::vector<DomTreeNode*> Children;
int DFSNumIn, DFSNumOut;
+ friend class DominatorTreeBase;
+ friend class PostDominatorTree;
public:
typedef std::vector<DomTreeNode*>::iterator iterator;
typedef std::vector<DomTreeNode*>::const_iterator const_iterator;
@@ -84,6 +87,7 @@ public:
inline DomTreeNode *addChild(DomTreeNode *C) { Children.push_back(C); return C; }
void setIDom(DomTreeNode *NewIDom);
+private:
// Return true if this node is dominated by other. Use this only if DFS info is valid.
bool DominatedBy(const DomTreeNode *other) const {
return this->DFSNumIn >= other->DFSNumIn &&