[llvm] r253426 - Remove a redundant assertion in MachineBasicBlock.cpp. NFC.

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 18 14:44:57 PST 2015


Makes sense.  Thanks.

Philip

On 11/17/2015 10:55 PM, Xinliang David Li wrote:
> The iterator based removeSuccessor does the check already.
>
> David
>
> On Tue, Nov 17, 2015 at 10:32 PM, Philip Reames via llvm-commits 
> <llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>> wrote:
>
>     On 11/17/2015 05:55 PM, Cong Hou via llvm-commits wrote:
>
>         Author: conghou
>         Date: Tue Nov 17 19:55:56 2015
>         New Revision: 253426
>
>         URL: http://llvm.org/viewvc/llvm-project?rev=253426&view=rev
>         Log:
>         Remove a redundant assertion in MachineBasicBlock.cpp. NFC.
>
>
>         Modified:
>              llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp
>
>         Modified: llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp
>         URL:
>         http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp?rev=253426&r1=253425&r2=253426&view=diff
>         ==============================================================================
>         --- llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp (original)
>         +++ llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp Tue Nov 17
>         19:55:56 2015
>         @@ -545,7 +545,6 @@ void MachineBasicBlock::addSuccessorWith
>             void MachineBasicBlock::removeSuccessor(MachineBasicBlock
>         *Succ) {
>             succ_iterator I = std::find(Successors.begin(),
>         Successors.end(), Succ);
>         -  assert(I != Successors.end() && "Not a current successor!");
>
>     Why is this redundant?  It appears to be checking whether Succ is
>     actually a successor of this.  That seems useful to say the least?
>
>             removeSuccessor(I);
>           }
>
>
>         _______________________________________________
>         llvm-commits mailing list
>         llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>
>         http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
>
>     _______________________________________________
>     llvm-commits mailing list
>     llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>
>     http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151118/abdf0a1d/attachment.html>


More information about the llvm-commits mailing list