From: Evgeniy Stepanov Date: Mon, 19 Sep 2016 21:26:05 +0000 (+0000) Subject: Misleading comments of SplitBlockAndInsertIfThenElse in BasicBlockUtils.h X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=050e90399c531b247ad16cdf1c6078a4a654b351;p=llvm Misleading comments of SplitBlockAndInsertIfThenElse in BasicBlockUtils.h 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 --- diff --git a/include/llvm/Transforms/Utils/BasicBlockUtils.h b/include/llvm/Transforms/Utils/BasicBlockUtils.h index 9c0c0bf2215..3d41dbe2b95 100644 --- a/include/llvm/Transforms/Utils/BasicBlockUtils.h +++ b/include/llvm/Transforms/Utils/BasicBlockUtils.h @@ -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