From d6a7b7552f5cc0a254b2faaf91451d85870ca7dd Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 25 Jun 2001 03:52:19 +0000 Subject: [PATCH] CFG.h: change the iterator tag Method.h: Add an iterator type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CFG.h | 3 ++- include/llvm/Function.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/llvm/CFG.h b/include/llvm/CFG.h index 7ddfbbf1cc4..e313e16fa69 100644 --- a/include/llvm/CFG.h +++ b/include/llvm/CFG.h @@ -111,7 +111,8 @@ class SuccIterator { unsigned idx; public: typedef SuccIterator<_Term, _BB> _Self; - typedef forward_iterator_tag iterator_category; + // TODO: This can be random access iterator, need operator+ and stuff tho + typedef bidirectional_iterator_tag iterator_category; typedef _BB pointer; inline SuccIterator(_Term T) : Term(T), idx(0) {} // begin iterator diff --git a/include/llvm/Function.h b/include/llvm/Function.h index 7448dce9fe3..7eb526f6a22 100644 --- a/include/llvm/Function.h +++ b/include/llvm/Function.h @@ -28,6 +28,7 @@ class Method : public SymTabValue { public: typedef ValueHolder ArgumentListType; typedef ValueHolder BasicBlocksType; + typedef BasicBlocksType::iterator iterator; private: // Important things that make up a method!