diff options
author | Vasileios Porpodas <vporpodas@google.com> | 2022-12-12 14:57:47 -0800 |
---|---|---|
committer | Vasileios Porpodas <vporpodas@google.com> | 2022-12-12 20:22:55 -0800 |
commit | a19ae77d2a9016428fee7cd5af03fd20ad6d4464 (patch) | |
tree | 68a8db9ead83aef2289609fac4be9bbf22828a8c /llvm/lib/Transforms/Utils/CloneFunction.cpp | |
parent | 1bf261c89b96df33ed14c6695f5f8590578e825d (diff) | |
download | llvm-a19ae77d2a9016428fee7cd5af03fd20ad6d4464.zip llvm-a19ae77d2a9016428fee7cd5af03fd20ad6d4464.tar.gz llvm-a19ae77d2a9016428fee7cd5af03fd20ad6d4464.tar.bz2 |
[IR][NFC] Adds Function::insertBasicBlockAt() to replace things like F->getBasicBlockList().insert()
This is part of a series of patches that aim at making Function::getBasicBlockList() private.
Differential Revision: https://reviews.llvm.org/D139906
Diffstat (limited to 'llvm/lib/Transforms/Utils/CloneFunction.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/CloneFunction.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp index 22807ec..e76761f 100644 --- a/llvm/lib/Transforms/Utils/CloneFunction.cpp +++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp @@ -670,7 +670,7 @@ void llvm::CloneAndPruneIntoFromInst(Function *NewFunc, const Function *OldFunc, continue; // Dead block. // Add the new block to the new function. - NewFunc->getBasicBlockList().push_back(NewBB); + NewFunc->insertBasicBlockAt(NewFunc->end(), NewBB); // Handle PHI nodes specially, as we have to remove references to dead // blocks. |