#ifndef LLVM_ANALYSIS_DATASTRUCTURE_GRAPH_H
#define LLVM_ANALYSIS_DATASTRUCTURE_GRAPH_H
-#include "Support/GraphTraits.h"
#include "llvm/Analysis/DataStructure.h"
+#include "Support/GraphTraits.h"
+#include "Support/iterator"
-class DSNodeIterator : public std::forward_iterator<DSNode, ptrdiff_t> {
+class DSNodeIterator : public forward_iterator<DSNode, ptrdiff_t> {
friend class DSNode;
DSNode * const Node;
unsigned Link;
#ifndef LLVM_ANALYSIS_DATASTRUCTURE_GRAPH_H
#define LLVM_ANALYSIS_DATASTRUCTURE_GRAPH_H
-#include "Support/GraphTraits.h"
#include "llvm/Analysis/DataStructure.h"
+#include "Support/GraphTraits.h"
+#include "Support/iterator"
-class DSNodeIterator : public std::forward_iterator<DSNode, ptrdiff_t> {
+class DSNodeIterator : public forward_iterator<DSNode, ptrdiff_t> {
friend class DSNode;
DSNode * const Node;
unsigned Link;
#ifndef LLVM_ANALYSIS_DATASTRUCTURE_GRAPH_H
#define LLVM_ANALYSIS_DATASTRUCTURE_GRAPH_H
-#include "Support/GraphTraits.h"
#include "llvm/Analysis/DataStructure.h"
+#include "Support/GraphTraits.h"
+#include "Support/iterator"
-class DSNodeIterator : public std::forward_iterator<DSNode, ptrdiff_t> {
+class DSNodeIterator : public forward_iterator<DSNode, ptrdiff_t> {
friend class DSNode;
DSNode * const Node;
unsigned Link;
};
-#endif MACHINE_INSTR_ANNOT_h
+#endif
typedef unsigned difference_type;
typedef BIty pointer;
typedef IIty reference;
+
+ // Copy constructor...
+ template<typename A, typename B, typename C, typename D>
+ InstIterator(const InstIterator<A,B,C,D> &II)
+ : BBs(II.BBs), BB(II.BB), BI(II.BI) {}
+
+ template<typename A, typename B, typename C, typename D>
+ InstIterator(InstIterator<A,B,C,D> &II)
+ : BBs(II.BBs), BB(II.BB), BI(II.BI) {}
template<class M> InstIterator(M &m)
: BBs(m.getBasicBlockList()), BB(BBs.begin()) { // begin ctor
};
-#endif MACHINE_INSTR_ANNOT_h
+#endif
#include <fstream>
#include <memory>
using std::cerr;
+using std::string;
static cl::opt<string>
InputFilename(cl::Positional, cl::desc("<input .llvm file>"), cl::init("-"));
#include <fstream>
#include <memory>
using std::cerr;
+using std::string;
static cl::opt<string>
InputFilename(cl::Positional, cl::desc("<input .llvm file>"), cl::init("-"));
#include <fstream>
#include <memory>
using std::cerr;
+using std::string;
static cl::opt<string>
InputFilename(cl::Positional, cl::desc("<input .llvm file>"), cl::init("-"));