MInstructionIterator MBasicBlock::discardAt(MInstructionIterator &iter) { AssertSafelyDiscardable(*iter); for (size_t i = 0; i < iter->numOperands(); i++) iter->discardOperand(i); return instructions_.removeAt(iter); }
void MBasicBlock::discardAllInstructionsStartingAt(MInstructionIterator &iter) { while (iter != end()) { for (size_t i = 0, e = iter->numOperands(); i < e; i++) iter->discardOperand(i); iter = instructions_.removeAt(iter); } }
void MBasicBlock::discardAllInstructions() { for (MInstructionIterator iter = begin(); iter != end(); ) { for (size_t i = 0, e = iter->numOperands(); i < e; i++) iter->discardOperand(i); iter = instructions_.removeAt(iter); } lastIns_ = NULL; }