From 158ff2c4a951d4725673d356569945be72f65ab5 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Sat, 21 Jun 2008 22:08:46 +0000 Subject: Use Instruction::eraseFromParent(). llvm-svn: 52606 --- llvm/lib/Transforms/IPO/LowerSetJmp.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/lib/Transforms/IPO/LowerSetJmp.cpp') diff --git a/llvm/lib/Transforms/IPO/LowerSetJmp.cpp b/llvm/lib/Transforms/IPO/LowerSetJmp.cpp index 20385f8ba6c..80158b43a5c 100644 --- a/llvm/lib/Transforms/IPO/LowerSetJmp.cpp +++ b/llvm/lib/Transforms/IPO/LowerSetJmp.cpp @@ -440,7 +440,7 @@ void LowerSetJmp::TransformSetJmpCall(CallInst* Inst) // Replace all uses of this instruction with the PHI node created by // the eradication of setjmp. Inst->replaceAllUsesWith(PHI); - Inst->getParent()->getInstList().erase(Inst); + Inst->eraseFromParent(); ++SetJmpsTransformed; } @@ -478,10 +478,10 @@ void LowerSetJmp::visitCallInst(CallInst& CI) // Replace the old call inst with the invoke inst and remove the call. CI.replaceAllUsesWith(II); - CI.getParent()->getInstList().erase(&CI); + CI.eraseFromParent(); // The old terminator is useless now that we have the invoke inst. - Term->getParent()->getInstList().erase(Term); + Term->eraseFromParent(); ++CallsTransformed; } -- cgit v1.2.3