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