MachineInstr *mi = ...; mi->eraseFromParent();
std::vectorIn this example, we use the `eraseFromParent` method to remove all of the instructions in `instrList` from their parent BasicBlock. Overall, the `MachineInstr::eraseFromParent` method is a useful tool for removing machine code instructions from a program. It is a part of the LLVM C++ library.instrList = ...; // a subset of instructions for (auto instr : instrList) { instr->eraseFromParent(); }