Exemplo n.º 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
         }
     }
 }
Exemplo n.º 2
0
 // Deference the iterator
 InstrPtr const &dereference() const {
     assert(cur != end);
     assert(cur->isInstr());
     return cur->getInstr();
 }
Exemplo n.º 3
0
 // Increase iterator
 void increment() {
     assert(cur != end);
     while(++cur != end and not cur->isInstr()) {}
 }