mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 00:21:03 +00:00
*** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3065 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -12,18 +12,20 @@
|
||||
#include "llvm/Function.h"
|
||||
#include "llvm/BasicBlock.h"
|
||||
#include "llvm/InstrTypes.h"
|
||||
#include <iterator>
|
||||
#include "Support/iterator"
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
// BasicBlock pred_iterator definition
|
||||
//===--------------------------------------------------------------------===//
|
||||
|
||||
template <class _Ptr, class _USE_iterator> // Predecessor Iterator
|
||||
class PredIterator : public std::bidirectional_iterator<_Ptr, ptrdiff_t> {
|
||||
class PredIterator : public bidirectional_iterator<_Ptr, ptrdiff_t> {
|
||||
typedef bidirectional_iterator<_Ptr, ptrdiff_t> super;
|
||||
_Ptr *BB;
|
||||
_USE_iterator It;
|
||||
public:
|
||||
typedef PredIterator<_Ptr,_USE_iterator> _Self;
|
||||
typedef typename super::pointer pointer;
|
||||
|
||||
inline void advancePastConstants() {
|
||||
// TODO: This is bad
|
||||
@@ -82,11 +84,13 @@ inline pred_const_iterator pred_end(const BasicBlock *BB) {
|
||||
//===--------------------------------------------------------------------===//
|
||||
|
||||
template <class _Term, class _BB> // Successor Iterator
|
||||
class SuccIterator : public std::bidirectional_iterator<_BB, ptrdiff_t> {
|
||||
class SuccIterator : public bidirectional_iterator<_BB, ptrdiff_t> {
|
||||
const _Term Term;
|
||||
unsigned idx;
|
||||
typedef bidirectional_iterator<_BB, ptrdiff_t> super;
|
||||
public:
|
||||
typedef SuccIterator<_Term, _BB> _Self;
|
||||
typedef typename super::pointer pointer;
|
||||
// TODO: This can be random access iterator, need operator+ and stuff tho
|
||||
|
||||
inline SuccIterator(_Term T) : Term(T), idx(0) { // begin iterator
|
||||
|
Reference in New Issue
Block a user