mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Previously, we would emit this as %1 = load [copy] %address %2 = moveonly_wrapper_to_copyable [owned] %1 which is difficult for move-only checking to handle, since %2 looks like a consume of %1, making it difficult to determine %1's true lifetime. Change this to %1 = moveonly_wrapper_to_copyable_addr %address %2 = load [copy] %address which is handled better by move-only checking, improving the accuracy of existing move-checking as well as fixing a spurious diagnostic when indirect parameters get passed as by-value arguments to other functions.
233 KiB
233 KiB