Skip to content

Commit 1ba0582

Browse files
committed
[Instruction] Updated comments in moveAfter* implementations
before->after
1 parent 56d8c5f commit 1ba0582

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/IR/Instruction.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,22 +191,22 @@ void Instruction::moveBeforePreserving(BasicBlock::iterator MovePos) {
191191

192192
void Instruction::moveAfter(Instruction *MovePos) {
193193
auto NextIt = std::next(MovePos->getIterator());
194-
// We want this instruction to be moved to before NextIt in the instruction
194+
// We want this instruction to be moved to after NextIt in the instruction
195195
// list, but before NextIt's debug value range.
196196
NextIt.setHeadBit(true);
197197
moveBeforeImpl(*MovePos->getParent(), NextIt, false);
198198
}
199199

200200
void Instruction::moveAfter(InstListType::iterator MovePos) {
201-
// We want this instruction to be moved to before NextIt in the instruction
201+
// We want this instruction to be moved to after NextIt in the instruction
202202
// list, but before NextIt's debug value range.
203203
MovePos.setHeadBit(true);
204204
moveBeforeImpl(*MovePos->getParent(), MovePos, false);
205205
}
206206

207207
void Instruction::moveAfterPreserving(Instruction *MovePos) {
208208
auto NextIt = std::next(MovePos->getIterator());
209-
// We want this instruction and its debug range to be moved to before NextIt
209+
// We want this instruction and its debug range to be moved to after NextIt
210210
// in the instruction list, but before NextIt's debug value range.
211211
NextIt.setHeadBit(true);
212212
moveBeforeImpl(*MovePos->getParent(), NextIt, true);

0 commit comments

Comments
 (0)