aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LowerSwitch.cpp
diff options
context:
space:
mode:
authorVasileios Porpodas <vporpodas@google.com>2022-11-23 14:53:00 -0800
committerVasileios Porpodas <vporpodas@google.com>2022-11-23 22:47:46 -0800
commitaf4e856fa71c6b5086aeda79bfcd954e98cef591 (patch)
treea22619357ddbe79735f53b3c8fff7a5e61ba2084 /llvm/lib/Transforms/Utils/LowerSwitch.cpp
parentfbcdf4a4fb9e51039877cc92bb18407416a158d7 (diff)
downloadllvm-af4e856fa71c6b5086aeda79bfcd954e98cef591.zip
llvm-af4e856fa71c6b5086aeda79bfcd954e98cef591.tar.gz
llvm-af4e856fa71c6b5086aeda79bfcd954e98cef591.tar.bz2
[NFC] Replaced BB->getInstList().{erase(),pop_front(),pop_back()} with eraseFromParent().
Differential Revision: https://reviews.llvm.org/D138617
Diffstat (limited to 'llvm/lib/Transforms/Utils/LowerSwitch.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LowerSwitch.cpp2
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))