Skip to content
Commit 362d1204 authored by Duncan P. N. Exon Smith's avatar Duncan P. N. Exon Smith
Browse files

Scalar: Avoid dereferencing end() in IndVarSimplify

IndVarSimplify::sinkUnusedInvariants calls
BasicBlock::getFirstInsertionPt on the ExitBlock and moves instructions
before it.  This can return end(), so it's not safe to dereference.  Add
an iterator-based overload to Instruction::moveBefore to avoid the UB.

llvm-svn: 278886
parent 67c5885d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment