aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/BasicBlock.cpp
diff options
context:
space:
mode:
authorArthur Eubanks <aeubanks@google.com>2023-06-16 13:47:30 -0700
committerArthur Eubanks <aeubanks@google.com>2023-06-16 13:53:31 -0700
commit3e39cfe5b4af7a8496049f623cfce177dc1903d6 (patch)
treefeeab5c951c0d48f68ddd7f512b6a787ad0c71b2 /llvm/lib/IR/BasicBlock.cpp
parent5759e3ce6d03a8363779df2efea554a15ff61047 (diff)
downloadllvm-3e39cfe5b4af7a8496049f623cfce177dc1903d6.zip
llvm-3e39cfe5b4af7a8496049f623cfce177dc1903d6.tar.gz
llvm-3e39cfe5b4af7a8496049f623cfce177dc1903d6.tar.bz2
Revert "Revert "InstSimplify: Require instruction be parented""
This reverts commit 0c03f48480f69b854f86d31235425b5cb71ac921. Going to fix forward size regression instead due to more dependent patches needing to be reverted otherwise.
Diffstat (limited to 'llvm/lib/IR/BasicBlock.cpp')
-rw-r--r--llvm/lib/IR/BasicBlock.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/IR/BasicBlock.cpp b/llvm/lib/IR/BasicBlock.cpp
index 5e900e6..14e1787 100644
--- a/llvm/lib/IR/BasicBlock.cpp
+++ b/llvm/lib/IR/BasicBlock.cpp
@@ -133,9 +133,8 @@ iplist<BasicBlock>::iterator BasicBlock::eraseFromParent() {
return getParent()->getBasicBlockList().erase(getIterator());
}
-void BasicBlock::moveBefore(BasicBlock *MovePos) {
- MovePos->getParent()->splice(MovePos->getIterator(), getParent(),
- getIterator());
+void BasicBlock::moveBefore(SymbolTableList<BasicBlock>::iterator MovePos) {
+ getParent()->splice(MovePos, getParent(), getIterator());
}
void BasicBlock::moveAfter(BasicBlock *MovePos) {