swift
cad6bec0 - IRGen: Set a "not bitwise borrowable" bit in value witnesses for `@_rawLayout` types.

Commit
1 year ago
IRGen: Set a "not bitwise borrowable" bit in value witnesses for `@_rawLayout` types. For types like `Atomic` and `Mutex`, we want to know that even though they are technically bitwise-takable, they differ from other bitwise-takable types until this point because they are not also "bitwise-borrowable"; while borrowed, they are pinned in memory, so they cannot be passed by value as a borrowed parameter, unlike copyable bitwise-takable types. Add a bit to the value witness table flags to record this. Note that this patch does not include any accompanying runtime support for propagating the flag into runtime-instantiated type metadata. There isn't yet any runtime functionality that varies based on this flag, so that can be implemented separately. rdar://136396806
Author
Committer
Parents
Loading