diff options
author | Dan Gohman <gohman@apple.com> | 2008-06-21 22:08:46 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-06-21 22:08:46 +0000 |
commit | 158ff2c4a951d4725673d356569945be72f65ab5 (patch) | |
tree | bbf6e3679da059a3049581afceeaa097a9b19515 /llvm/lib/Transforms/Utils/CodeExtractor.cpp | |
parent | c7076914ac10310a3580a3bfca84fea7ccc65b28 (diff) | |
download | bcm5719-llvm-158ff2c4a951d4725673d356569945be72f65ab5.tar.gz bcm5719-llvm-158ff2c4a951d4725673d356569945be72f65ab5.zip |
Use Instruction::eraseFromParent().
llvm-svn: 52606
Diffstat (limited to 'llvm/lib/Transforms/Utils/CodeExtractor.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/CodeExtractor.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/CodeExtractor.cpp b/llvm/lib/Transforms/Utils/CodeExtractor.cpp index cb7a5293b7f..1c937fbd0d0 100644 --- a/llvm/lib/Transforms/Utils/CodeExtractor.cpp +++ b/llvm/lib/Transforms/Utils/CodeExtractor.cpp @@ -550,18 +550,18 @@ emitCallAndSwitchStatement(Function *newFunction, BasicBlock *codeReplacer, ReturnInst::Create(Constant::getNullValue(OldFnRetTy), TheSwitch); } - TheSwitch->getParent()->getInstList().erase(TheSwitch); + TheSwitch->eraseFromParent(); break; case 1: // Only a single destination, change the switch into an unconditional // branch. BranchInst::Create(TheSwitch->getSuccessor(1), TheSwitch); - TheSwitch->getParent()->getInstList().erase(TheSwitch); + TheSwitch->eraseFromParent(); break; case 2: BranchInst::Create(TheSwitch->getSuccessor(1), TheSwitch->getSuccessor(2), call, TheSwitch); - TheSwitch->getParent()->getInstList().erase(TheSwitch); + TheSwitch->eraseFromParent(); break; default: // Otherwise, make the default destination of the switch instruction be one |