mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This optimization is doing 2 things: replacing getElement calls and replacing append(contentOf:) calls. Now if the argument to a append(contentOf:) is a previously replaced getElement call, we ended up in a use-after-free crash. The main change here is to do the transformations immediately after gathering the data (and that means: separately) and not collecting all the data and do both transformation afterwards The pass does not use any Analysis (where invalidation could be a problem). Also iterator invalidation is not a problem here. SR-10003 rdar://problem/48445856
13 KiB
13 KiB