diff options
Diffstat (limited to 'llvm/lib/Transforms/Utils/LowerSwitch.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Utils/LowerSwitch.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/LowerSwitch.cpp b/llvm/lib/Transforms/Utils/LowerSwitch.cpp index 44aeb26..a0019d0 100644 --- a/llvm/lib/Transforms/Utils/LowerSwitch.cpp +++ b/llvm/lib/Transforms/Utils/LowerSwitch.cpp @@ -520,7 +520,7 @@ void ProcessSwitchInst(SwitchInst *SI, // We are now done with the switch instruction, delete it. BasicBlock *OldDefault = SI->getDefaultDest(); - OrigBlock->getInstList().erase(SI); + SI->eraseFromParent(); // If the Default block has no more predecessors just add it to DeleteList. if (pred_empty(OldDefault)) |
