19 #ifndef LLVM_IR_INSTITERATOR_H 20 #define LLVM_IR_INSTITERATOR_H 33 template <
class BB_t,
class BB_i_t,
class BI_t,
class II_t>
class InstIterator {
53 template<
typename A,
typename B,
typename C,
typename D>
55 : BBs(II.BBs), BB(II.BB), BI(II.BI) {}
57 template<
typename A,
typename B,
typename C,
typename D>
59 : BBs(II.BBs), BB(II.BB), BI(II.BI) {}
62 : BBs(&m.getBasicBlockList()), BB(BBs->
begin()) {
63 if (BB != BBs->end()) {
70 : BBs(&m.getBasicBlockList()), BB(BBs->
end()) {
81 return BB == y.BB && (BB == BBs->end() || BI == y.BI);
97 while (BB == BBs->end() || BI == BB->begin()) {
108 inline bool atEnd()
const {
return BB == BBs->end(); }
111 inline void advanceToNextBB() {
114 while (BI == BB->end()) {
116 if (BB == BBs->end())
break;
163 #endif // LLVM_IR_INSTITERATOR_H const_iterator end(StringRef path)
Get end iterator over path.
const_iterator begin(StringRef path, Style style=Style::native)
Get begin iterator over path.
This class represents lattice values for constants.
bool operator!=(const InstIterator &y) const
InstIterator operator++(int)
This provides a very simple, boring adaptor for a begin and end iterator into a range type...
bool operator==(const InstIterator &y) const
InstIterator & operator++()
reference operator*() const
InstListType::const_iterator const_iterator
inst_iterator inst_begin(Function *F)
InstIterator< SymbolTableList< BasicBlock >, Function::iterator, BasicBlock::iterator, Instruction > inst_iterator
InstIterator(InstIterator< A, B, C, D > &II)
BasicBlockListType::iterator iterator
InstIterator & operator--()
BasicBlockListType::const_iterator const_iterator
BBIty & getBasicBlockIterator()
InstIterator< const SymbolTableList< BasicBlock >, Function::const_iterator, BasicBlock::const_iterator, const Instruction > const_inst_iterator
BIty & getInstructionIterator()
std::bidirectional_iterator_tag iterator_category
A range adaptor for a pair of iterators.
InstListType::iterator iterator
Instruction iterators...
iterator_range< inst_iterator > inst_range
InstIterator operator--(int)
iterator_range< const_inst_iterator > const_inst_range
inst_range instructions(Function *F)
inst_iterator inst_end(Function *F)
InstIterator(const InstIterator< A, B, C, D > &II)
pointer operator->() const