TailDuplicator: Fix crash after r278974

Some inputs would after r278974 without this fix (see
http://lab.llvm.org:8080/green/job/clang-stage2-cmake-RgSan_build/2733/console
for an example)

llvm-svn: 279022
This commit is contained in:
Matthias Braun 2016-08-18 00:59:32 +00:00
parent cb1ea8721b
commit d84c46a824

View File

@ -673,7 +673,7 @@ bool TailDuplicator::duplicateSimpleBB(
<< "From simple Succ: " << *TailBB);
MachineBasicBlock *NewTarget = *TailBB->succ_begin();
MachineBasicBlock *NextBB = &*std::next(PredBB->getIterator());
MachineBasicBlock *NextBB = PredBB->getNextNode();
// Make PredFBB explicit.
if (PredCond.empty())