mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Update to match llvm r280032
Use the ilist getReverse() function instead of constructing a
reverse_iterator from a forward iterator.
(cherry picked from commit 9e96e0965d)
This commit is contained in:
@@ -907,7 +907,7 @@ bool COWArrayOpt::isArrayValueReleasedBeforeMutate(
|
||||
}
|
||||
|
||||
static SILInstruction *getInstBefore(SILInstruction *I) {
|
||||
auto It = SILBasicBlock::reverse_iterator(I->getIterator());
|
||||
auto It = ++I->getIterator().getReverse();
|
||||
if (I->getParent()->rend() == It)
|
||||
return nullptr;
|
||||
return &*It;
|
||||
@@ -939,8 +939,7 @@ stripValueProjections(SILValue V,
|
||||
/// by the array bounds check elimination pass.
|
||||
static SILInstruction *
|
||||
findPrecedingCheckSubscriptOrMakeMutable(ApplyInst *GetElementAddr) {
|
||||
for (auto ReverseIt =
|
||||
SILBasicBlock::reverse_iterator(GetElementAddr->getIterator()),
|
||||
for (auto ReverseIt = ++GetElementAddr->getIterator().getReverse(),
|
||||
End = GetElementAddr->getParent()->rend();
|
||||
ReverseIt != End; ++ReverseIt) {
|
||||
auto Apply = dyn_cast<ApplyInst>(&*ReverseIt);
|
||||
|
||||
Reference in New Issue
Block a user