File tree 4 files changed +5
-7
lines changed
4 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -90,16 +90,14 @@ void SILBasicBlock::remove(SILInstruction *I) {
90
90
InstList.remove (I);
91
91
}
92
92
93
- // / Returns the iterator following the erased instruction, STL-style .
93
+ // / Returns the iterator following the erased instruction.
94
94
SILBasicBlock::iterator SILBasicBlock::erase (SILInstruction *I) {
95
95
// Notify the delete handlers that this instruction is going away.
96
96
getModule ().notifyDeleteHandlers (&*I);
97
97
auto *F = getParent ();
98
- // LLVM does not currently implement ilist::erase correctly. Compensate.
99
- iterator next = std::next (SILBasicBlock::iterator (I));
100
- InstList.erase (I);
98
+ auto nextIter = InstList.erase (I);
101
99
F->getModule ().deallocateInst (I);
102
- return next ;
100
+ return nextIter ;
103
101
}
104
102
105
103
// / This method unlinks 'self' from the containing SILFunction and deletes it.
Original file line number Diff line number Diff line change @@ -52,10 +52,12 @@ struct AccessMarkerElimination : SILModuleTransform {
52
52
if (auto beginAccess = dyn_cast<BeginAccessInst>(inst)) {
53
53
beginAccess->replaceAllUsesWith (beginAccess->getSource ());
54
54
II = BB.erase (beginAccess);
55
+ continue ;
55
56
}
56
57
if (auto endAccess = dyn_cast<EndAccessInst>(inst)) {
57
58
assert (endAccess->use_empty ());
58
59
II = BB.erase (endAccess);
60
+ continue ;
59
61
}
60
62
}
61
63
}
Original file line number Diff line number Diff line change 1
1
// RUN: %target-sil-opt -enforce-exclusivity=checked -emit-sorted-sil -access-marker-elim %s | %FileCheck %s
2
- // REQUIRES: rdar:31550303 OSS Swift CI ASAN bot fails on AccessMarker tests.
3
2
4
3
sil_stage raw
5
4
Original file line number Diff line number Diff line change 1
1
// RUN: %target-swift-frontend -parse-as-library -Xllvm -sil-full-demangle -enforce-exclusivity=checked -emit-sil %s | %FileCheck %s
2
- // REQUIRES: rdar:31550303 OSS Swift CI ASAN bot fails on AccessMarker tests.
3
2
4
3
public struct S {
5
4
var i : Int
You can’t perform that action at this time.
0 commit comments