diff options
| author | Vasileios Porpodas <vporpodas@google.com> | 2022-11-23 14:53:00 -0800 |
|---|---|---|
| committer | Vasileios Porpodas <vporpodas@google.com> | 2022-11-23 22:47:46 -0800 |
| commit | af4e856fa71c6b5086aeda79bfcd954e98cef591 (patch) | |
| tree | a22619357ddbe79735f53b3c8fff7a5e61ba2084 /llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp | |
| parent | fbcdf4a4fb9e51039877cc92bb18407416a158d7 (diff) | |
[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/PromoteMemoryToRegister.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp b/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp index 195b1bc7eadb..f5a76458e063 100644 --- a/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp +++ b/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp @@ -1057,7 +1057,7 @@ NextIteration: // Anything using the load now uses the current value. LI->replaceAllUsesWith(V); - BB->getInstList().erase(LI); + LI->eraseFromParent(); } else if (StoreInst *SI = dyn_cast<StoreInst>(I)) { // Delete this instruction and mark the name as the current holder of the // value @@ -1079,7 +1079,7 @@ NextIteration: for (DbgVariableIntrinsic *DII : AllocaDbgUsers[ai->second]) if (DII->isAddressOfVariable()) ConvertDebugDeclareToDebugValue(DII, SI, DIB); - BB->getInstList().erase(SI); + SI->eraseFromParent(); } } |
