]> granicus.if.org Git - llvm/commitdiff
Misleading comments of SplitBlockAndInsertIfThenElse in BasicBlockUtils.h
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Mon, 19 Sep 2016 21:26:05 +0000 (21:26 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Mon, 19 Sep 2016 21:26:05 +0000 (21:26 +0000)
The comments of SplitBlockAndInsertIfThenElse say the SplitBefore instruction will stay in the old block.
But according to the implementation(split the block at SplitBefore by using splitBasicBlock), the SplitBefore will be moved to the new block.

This patch fixes the comments.

Patch by Zhe Yu Wu.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281939 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Transforms/Utils/BasicBlockUtils.h

index 9c0c0bf2215db6525e5b0079a8c1af59d607115e..3d41dbe2b954731ca2dd9a4d1e00a81e5b943448 100644 (file)
@@ -230,8 +230,8 @@ ReturnInst *FoldReturnIntoUncondBranch(ReturnInst *RI, BasicBlock *BB,
                                        BasicBlock *Pred);
 
 /// Split the containing block at the specified instruction - everything before
-/// and including SplitBefore stays in the old basic block, and everything after
-/// SplitBefore is moved to a new block. The two blocks are connected by a
+/// SplitBefore stays in the old basic block, and the rest of the instructions
+/// in the BB are moved to a new block. The two blocks are connected by a
 /// conditional branch (with value of Cmp being the condition).
 /// Before:
 ///   Head