aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/InlineFunction.cpp
diff options
context:
space:
mode:
authorVasileios Porpodas <vporpodas@google.com>2022-12-12 17:03:08 -0800
committerVasileios Porpodas <vporpodas@google.com>2022-12-13 11:46:29 -0800
commitadfb23c607ce35f090cf3e29fba9d382b22c3a50 (patch)
tree6f84881f515cd05b45e1aa2d8384c9793022d391 /llvm/lib/Transforms/Utils/InlineFunction.cpp
parentee11ef6dc0b293161dd916b64581eb37a231709b (diff)
downloadllvm-adfb23c607ce35f090cf3e29fba9d382b22c3a50.zip
llvm-adfb23c607ce35f090cf3e29fba9d382b22c3a50.tar.gz
llvm-adfb23c607ce35f090cf3e29fba9d382b22c3a50.tar.bz2
[NFC] Cleanup: Remove Function::getBasicBlockList() when not required.
This is part of a series of patches that aim at making Function::getBasicBlockList() private. Differential Revision: https://reviews.llvm.org/D139910
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/InlineFunction.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp
index 411ccc2..dfbcac7 100644
--- a/llvm/lib/Transforms/Utils/InlineFunction.cpp
+++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp
@@ -2758,7 +2758,7 @@ llvm::InlineResult llvm::InlineFunction(CallBase &CB, InlineFunctionInfo &IFI,
OrigBB->splice(CB.getIterator(), &*FirstNewBlock, FirstNewBlock->begin(),
FirstNewBlock->end());
// Remove the cloned basic block.
- Caller->getBasicBlockList().pop_back();
+ Caller->back().eraseFromParent();
// If the call site was an invoke instruction, add a branch to the normal
// destination.
@@ -2932,7 +2932,7 @@ llvm::InlineResult llvm::InlineFunction(CallBase &CB, InlineFunctionInfo &IFI,
Br->eraseFromParent();
// Now we can remove the CalleeEntry block, which is now empty.
- Caller->getBasicBlockList().erase(CalleeEntry);
+ CalleeEntry->eraseFromParent();
// If we inserted a phi node, check to see if it has a single value (e.g. all
// the entries are the same or undef). If so, remove the PHI so it doesn't