summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Instruction.cpp
diff options
context:
space:
mode:
authorDaniel Berlin <dberlin@dberlin.org>2015-04-02 00:03:07 +0000
committerDaniel Berlin <dberlin@dberlin.org>2015-04-02 00:03:07 +0000
commita5af7200519e1496e186e2c7b8f05c93c4a193e0 (patch)
tree7a7782cbc39b9d865ee522716d13600bf0ec4c43 /llvm/lib/IR/Instruction.cpp
parent2af5dbb1ddcc76d660985a26ad639856a62035d8 (diff)
downloadbcm5719-llvm-a5af7200519e1496e186e2c7b8f05c93c4a193e0.tar.gz
bcm5719-llvm-a5af7200519e1496e186e2c7b8f05c93c4a193e0.zip
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 llvm-svn: 233869
Diffstat (limited to 'llvm/lib/IR/Instruction.cpp')
-rw-r--r--llvm/lib/IR/Instruction.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/Instruction.cpp b/llvm/lib/IR/Instruction.cpp
index 7d9bd7ed5ff..57c143cca2c 100644
--- a/llvm/lib/IR/Instruction.cpp
+++ b/llvm/lib/IR/Instruction.cpp
@@ -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
OpenPOWER on IntegriCloud