Files
Elsa Keirouz 35ef1f1bea [Opaque Values] Load an address-only InlineArray literal instead of casting it
emitInlineArrayLiteral adopts the stack slot of an address-only InlineArray
as the value of the literal with unchecked_addr_cast. That needs the lowered
type of the array to be an address type. With opaque values it is an object
type, so the verifier rejected the cast result: "unchecked_addr_cast result
must be an address". This happened for any address-only element type, such as
a noncopyable or a generic one.

Only adopt the stack slot when addresses are lowered. With opaque values, load
the array out of the slot, as for a loadable array.

Run test/SILGen/inlinearray_literal.swift under opaque values, with both
-emit-silgen and -emit-sil, instead of expecting a crash, and add a generic
function to it. Remove the XFAIL from test/stdlib/InlineArray.swift.
2026-12-03 20:34:40 +00:00
..
2026-10-08 14:57:31 -07:00
…
…
…