From c5a22ce2b97ca477af345ad8b4dd357fa4561fcd Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 13 Oct 2001 06:25:03 +0000 Subject: [PATCH] Changes to compile with GCC 2.96 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@745 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/Dominators.h | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h index f79826f2d29..6639b64a055 100644 --- a/include/llvm/Analysis/Dominators.h +++ b/include/llvm/Analysis/Dominators.h @@ -126,33 +126,36 @@ public: // DominatorTree - Calculate the immediate dominator tree for a method. // class DominatorTree : public DominatorBase { - class Node; + class Node2; +public: + typedef Node2 Node; +private: map Nodes; void calculate(const DominatorSet &DS); typedef map NodeMapType; public: - class Node : public vector { + class Node2 : public vector { friend class DominatorTree; const BasicBlock *TheNode; - Node * const IDom; + Node2 * const IDom; public: inline const BasicBlock *getNode() const { return TheNode; } - inline Node *getIDom() const { return IDom; } + inline Node2 *getIDom() const { return IDom; } inline const vector &getChildren() const { return *this; } // dominates - Returns true iff this dominates N. Note that this is not a // constant time operation! - inline bool dominates(const Node *N) const { - const Node *IDom; + inline bool dominates(const Node2 *N) const { + const Node2 *IDom; while ((IDom = N->getIDom()) != 0 && IDom != this) N = IDom; // Walk up the tree return IDom != 0; } private: - inline Node(const BasicBlock *node, Node *iDom) + inline Node2(const BasicBlock *node, Node *iDom) : TheNode(node), IDom(iDom) {} - inline Node *addChild(Node *C) { push_back(C); return C; } + inline Node2 *addChild(Node *C) { push_back(C); return C; } }; public: @@ -177,6 +180,7 @@ public: // DominanceFrontier - Calculate the dominance frontiers for a method. // class DominanceFrontier : public DominatorBase { +public: typedef set DomSetType; // Dom set for a bb typedef map DomSetMapType; // Map of dom sets private: