Skip to content

Commit 56d8c5f

Browse files
committed
[Instruction] Add missing implementation for moveAfter(InstListType::iterator)
1 parent eb71fdd commit 56d8c5f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

llvm/lib/IR/Instruction.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,13 @@ void Instruction::moveAfter(Instruction *MovePos) {
197197
moveBeforeImpl(*MovePos->getParent(), NextIt, false);
198198
}
199199

200+
void Instruction::moveAfter(InstListType::iterator MovePos) {
201+
// We want this instruction to be moved to before NextIt in the instruction
202+
// list, but before NextIt's debug value range.
203+
MovePos.setHeadBit(true);
204+
moveBeforeImpl(*MovePos->getParent(), MovePos, false);
205+
}
206+
200207
void Instruction::moveAfterPreserving(Instruction *MovePos) {
201208
auto NextIt = std::next(MovePos->getIterator());
202209
// We want this instruction and its debug range to be moved to before NextIt

0 commit comments

Comments
 (0)