From 047e81d9f157b58e841ea65655924ef2da3f16b2 Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Mon, 19 Sep 2016 21:26:05 +0000 Subject: [PATCH] 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. llvm-svn: 281939 --- llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h b/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h index 9c0c0bf..3d41dbe 100644 --- a/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h +++ b/llvm/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 -- 2.7.4