mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Return iterator from Instruction::eraseFromParent.
Summary: This is necessary in order to make removal while using reverse iterators work. (See http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-March/084122.html) Updates to other eraseFromParent's to come in later patches. Reviewers: chandlerc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8783 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233869 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -62,8 +62,8 @@ void Instruction::removeFromParent() {
|
||||
getParent()->getInstList().remove(this);
|
||||
}
|
||||
|
||||
void Instruction::eraseFromParent() {
|
||||
getParent()->getInstList().erase(this);
|
||||
iplist<Instruction>::iterator Instruction::eraseFromParent() {
|
||||
return getParent()->getInstList().erase(this);
|
||||
}
|
||||
|
||||
/// insertBefore - Insert an unlinked instructions into a basic block
|
||||
|
Reference in New Issue
Block a user