mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
The reason why is that due to ARCCodeMotion, they could have moved enough that the SourceLoc on them is incorrect. That is why you can see in the tests that I had to update, I am moving the retain to the return statement from the body of the function since the retain was now right before the return. I also went in and cleaned up the logic here a little bit. What we do now is that we have a notion of instructions that we /always/ infer SourceLocs for (rr) and ones that if we have a valid non-inlined location we use (e.x.: allocations). This mucked a little bit with my ability to run SIL tests since the SIL tests were relying on this not happening to rr so that we would emit remarks on the rr instructions themselves. I added an option that disables the always infer behavior for this test. That being said at this point to me it seems like the SourceLoc inference stuff is really tied to OptRemarkGenerator and I am going to see if I can move it to there. But that is for a future commit on another day.
9.5 KiB
9.5 KiB