llvm::Instruction::eraseFromParent

This method unlinks 'this' from the containing basic block and deletes it.

Synopsis

Declared in <llvm/IR/Instruction.h>

InstListType::iterator
eraseFromParent();

Return Value

an iterator pointing to the element after the erased one