mirror of
https://github.com/apple/swift.git
synced 2026-02-27 18:26:24 +01:00
The LoadableByAddress pass rewrites alloc_stack instructions when their element type changes (e.g., a function parameter convention changes from @guaranteed to @in_guaranteed for large/opaque types). However, it was passing the original SILDebugVariable info through unchanged. When the VarInfo has an explicit Type field set this creates a mismatch between the SSA type and the debug type, causing a SIL verifier failure. In this patch, I just change the pass to update the alloc_stack as appropriate. I verified that this cannot happen with debug_value since we do not store the extra type info in it if we have an object typed thing. Since loadable_by_address only changes objects -> addresses, it can never happen. rdar://164268891
182 KiB
182 KiB