summaryrefslogtreecommitdiff
path: root/include/llvm/ADT/DepthFirstIterator.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-01-20 22:54:45 +0000
committerChris Lattner <sabre@nondot.org>2002-01-20 22:54:45 +0000
commit697954c15da58bd8b186dbafdedd8b06db770201 (patch)
treee119a71f09b5c2513c8c270161ae2a858c6f3b96 /include/llvm/ADT/DepthFirstIterator.h
parent13c4659220bc78a0a3529f4d9e57546e898088e3 (diff)
downloadllvm-697954c15da58bd8b186dbafdedd8b06db770201.tar.gz
llvm-697954c15da58bd8b186dbafdedd8b06db770201.tar.bz2
llvm-697954c15da58bd8b186dbafdedd8b06db770201.tar.xz
Changes to build successfully with GCC 3.02
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1503 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/DepthFirstIterator.h')
-rw-r--r--include/llvm/ADT/DepthFirstIterator.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/llvm/ADT/DepthFirstIterator.h b/include/llvm/ADT/DepthFirstIterator.h
index a2d5a9df68..2961497adc 100644
--- a/include/llvm/ADT/DepthFirstIterator.h
+++ b/include/llvm/ADT/DepthFirstIterator.h
@@ -20,21 +20,21 @@ class df_iterator : public std::forward_iterator<typename GT::NodeType,
typedef typename GT::NodeType NodeType;
typedef typename GT::ChildIteratorType ChildItTy;
- set<NodeType *> Visited; // All of the blocks visited so far...
+ std::set<NodeType *> Visited; // All of the blocks visited so far...
// VisitStack - Used to maintain the ordering. Top = current block
// First element is node pointer, second is the 'next child' to visit
- stack<pair<NodeType *, ChildItTy> > VisitStack;
+ std::stack<std::pair<NodeType *, ChildItTy> > VisitStack;
const bool Reverse; // Iterate over children before self?
private:
void reverseEnterNode() {
- pair<NodeType *, ChildItTy> &Top = VisitStack.top();
+ std::pair<NodeType *, ChildItTy> &Top = VisitStack.top();
NodeType *Node = Top.first;
ChildItTy &It = Top.second;
for (; It != GT::child_end(Node); ++It) {
NodeType *Child = *It;
if (!Visited.count(Child)) {
Visited.insert(Child);
- VisitStack.push(make_pair(Child, GT::child_begin(Child)));
+ VisitStack.push(std::make_pair(Child, GT::child_begin(Child)));
reverseEnterNode();
return;
}
@@ -43,7 +43,7 @@ private:
inline df_iterator(NodeType *Node, bool reverse) : Reverse(reverse) {
Visited.insert(Node);
- VisitStack.push(make_pair(Node, GT::child_begin(Node)));
+ VisitStack.push(std::make_pair(Node, GT::child_begin(Node)));
if (Reverse) reverseEnterNode();
}
inline df_iterator() { /* End is when stack is empty */ }
@@ -81,7 +81,7 @@ public:
reverseEnterNode();
} else { // Normal Depth First Iterator
do {
- pair<NodeType *, ChildItTy> &Top = VisitStack.top();
+ std::pair<NodeType *, ChildItTy> &Top = VisitStack.top();
NodeType *Node = Top.first;
ChildItTy &It = Top.second;
@@ -90,7 +90,7 @@ public:
if (!Visited.count(Next)) { // Has our next sibling been visited?
// No, do it now.
Visited.insert(Next);
- VisitStack.push(make_pair(Next, GT::child_begin(Next)));
+ VisitStack.push(std::make_pair(Next, GT::child_begin(Next)));
return *this;
}
}