aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/BasicBlock.cpp
diff options
context:
space:
mode:
authorAlan Zhao <ayzhao@google.com>2023-06-16 10:35:52 -0700
committerAlan Zhao <ayzhao@google.com>2023-06-16 10:36:49 -0700
commit00264eac4d0938ae8a0826da38e4777be269124c (patch)
tree5b5b6adaa78ab86d06bce97782b739dbc2ec79f7 /llvm/lib/IR/BasicBlock.cpp
parent100cb5bacce1dfe4e74df769ac545c89200e362f (diff)
downloadllvm-00264eac4d0938ae8a0826da38e4777be269124c.zip
llvm-00264eac4d0938ae8a0826da38e4777be269124c.tar.gz
llvm-00264eac4d0938ae8a0826da38e4777be269124c.tar.bz2
Revert "InstSimplify: Require instruction be parented"
This reverts commit 1536e299e63d7788f38117b0212ca50eb76d7a3b. Reason: causes a regression in the inliner (see https://crbug.com/1454531 and https://reviews.llvm.org/rG1536e299e63d7788f38117b0212ca50eb76d7a3b#1217141)
Diffstat (limited to 'llvm/lib/IR/BasicBlock.cpp')
-rw-r--r--llvm/lib/IR/BasicBlock.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/IR/BasicBlock.cpp b/llvm/lib/IR/BasicBlock.cpp
index 14e1787..5e900e6 100644
--- a/llvm/lib/IR/BasicBlock.cpp
+++ b/llvm/lib/IR/BasicBlock.cpp
@@ -133,8 +133,9 @@ iplist<BasicBlock>::iterator BasicBlock::eraseFromParent() {
return getParent()->getBasicBlockList().erase(getIterator());
}
-void BasicBlock::moveBefore(SymbolTableList<BasicBlock>::iterator MovePos) {
- getParent()->splice(MovePos, getParent(), getIterator());
+void BasicBlock::moveBefore(BasicBlock *MovePos) {
+ MovePos->getParent()->splice(MovePos->getIterator(), getParent(),
+ getIterator());
}
void BasicBlock::moveAfter(BasicBlock *MovePos) {