Files
swift-mirror/lib/SILGen/SILGenPattern.cpp
Benjamin Levine e93ea1db26 [SILGen] Fix load ownership for trivial tuple elements in consuming switch
In consuming switch when emitting case block that destructures a tuple payload,
it was unconditionally issuing load [take] even if the element was a trivial type.
Later code assumes loads for trivial types have trivial ownership.

The fix uses TypeLowering::emitLoad() instead of directly creating the
load, which handles setting ownership to trivial if the type is trivial.

Fixes #85743
2025-12-01 14:43:08 -05:00

154 KiB