From 0bf7ff56a69b0d85e26139d8d6d6635a15b6f961 Mon Sep 17 00:00:00 2001 From: Daniel Berlin Date: Fri, 3 Apr 2015 01:20:33 +0000 Subject: Return iterator from BasicBlock::eraseFromParent Summary: Same as the last patch, but for BasicBlock (Requires same code movement) Reviewers: chandlerc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8801 llvm-svn: 233992 --- llvm/lib/IR/BasicBlock.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/IR/BasicBlock.cpp') diff --git a/llvm/lib/IR/BasicBlock.cpp b/llvm/lib/IR/BasicBlock.cpp index fe38385d341..23ec7052954 100644 --- a/llvm/lib/IR/BasicBlock.cpp +++ b/llvm/lib/IR/BasicBlock.cpp @@ -94,8 +94,8 @@ void BasicBlock::removeFromParent() { getParent()->getBasicBlockList().remove(this); } -void BasicBlock::eraseFromParent() { - getParent()->getBasicBlockList().erase(this); +iplist::iterator BasicBlock::eraseFromParent() { + return getParent()->getBasicBlockList().erase(this); } /// Unlink this basic block from its current function and -- cgit v1.2.3