The use of 'nocapture' for parameters and return values is incorrect for C++ types, as they can actually capture a pointer into its own value (e.g. std::string in libstdc++)
rdar://115062687
Added pack flavors of requirement kinds for metadata and witness tables.
Fixes the function signatures for variadic generic functions which
previously used %swift.type* for variadic generic parameters--those are
lists of metadata and should actually be %swift.type**.
- SILPackType carries whether the elements are stored directly
in the pack, which we're not currently using in the lowering,
but it's probably something we'll want in the final ABI.
Having this also makes it clear that we're doing the right
thing with substitution and element lowering. I also toyed
with making this a scalar type, which made it necessary in
various places, although eventually I pulled back to the
design where we always use packs as addresses.
- Pack boundaries are a core ABI concept, so the lowering has
to wrap parameter pack expansions up as packs. There are huge
unimplemented holes here where the abstraction pattern will
need to tell us how many elements to gather into the pack,
but a naive approach is good enough to get things off the
ground.
- Pack conventions are related to the existing parameter and
result conventions, but they're different on enough grounds
that they deserve to be separated.
Previously, pack expansion types of plain parameter packs whose reduced
shape is another parameter pack (i.e. as a result of parallel pack expansion
somewhere else in the signature) was previously incorrect. Fixing that "broke"
the incorrect mangling in these tests.