From 8bc489fd7fc767a1b6de561ad7ea91e96d5a2027 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 14 Apr 2010 15:38:15 +0000 Subject: [PATCH] Make SuccIterator's private parts private too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101244 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/CFG.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/include/llvm/Support/CFG.h b/include/llvm/Support/CFG.h index 717802f6dbf..6e32c8a7785 100644 --- a/include/llvm/Support/CFG.h +++ b/include/llvm/Support/CFG.h @@ -91,8 +91,13 @@ class SuccIterator : public std::iterator super; -public: typedef SuccIterator _Self; + + inline bool index_is_valid(int idx) { + return idx >= 0 && (unsigned) idx < Term->getNumSuccessors(); + } + +public: typedef typename super::pointer pointer; // TODO: This can be random access iterator, only operator[] missing. @@ -110,10 +115,6 @@ public: return *this; } - inline bool index_is_valid (int idx) { - return idx >= 0 && (unsigned) idx < Term->getNumSuccessors(); - } - /// getSuccessorIndex - This is used to interface between code that wants to /// operate on terminator instructions directly. unsigned getSuccessorIndex() const { return idx; } -- 2.34.1