Пример #1
0
 /// Construct based on a block
 explicit LocalInstrList(const std::vector<Block> &block_list) : cur(block_list.begin()), end(block_list.end()) {
     if (cur != end) {
         if (not cur->isInstr()) {
             increment(); // Get to the first instruction
         }
     }
 }
Пример #2
0
 // Deference the iterator
 InstrPtr const &dereference() const {
     assert(cur != end);
     assert(cur->isInstr());
     return cur->getInstr();
 }
Пример #3
0
 // Increase iterator
 void increment() {
     assert(cur != end);
     while(++cur != end and not cur->isInstr()) {}
 }