mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[semantic-sil] Eliminate ValueOwnershipKind::Any from SILPHIArguments in Semantic SIL.
Most of this involved sprinkling ValueOwnershipKind::Owned in many places. In some of these places, I am sure I was too cavalier and I expect some of them to be trivial. The verifier will help me to track those down. On the other hand, I do expect there to be some places where we are willing to accept guaranteed+trivial or owned+trivial. In those cases, I am going to provide an aggregate ValueOwnershipKind that will then tell SILArgument that it should disambiguate using the type. This will eliminate the ackwardness from such code. I am going to use a verifier to fix such cases. This commit also begins the serialization of ValueOwnershipKind of arguments, but does not implement parsing of value ownership kinds. That and undef are the last places that we still use ValueOwnershipKind::Any. rdar://29791263
This commit is contained in:
@@ -54,7 +54,7 @@ const uint16_t VERSION_MAJOR = 0;
|
||||
/// in source control, you should also update the comment to briefly
|
||||
/// describe what change you made. The content of this comment isn't important;
|
||||
/// it just ensures a conflict if two people change the module format.
|
||||
const uint16_t VERSION_MINOR = 305; // Last change: linkage in SILVTable::Entry
|
||||
const uint16_t VERSION_MINOR = 306; // Last change: SILArgument+Ownership
|
||||
|
||||
using DeclID = PointerEmbeddedInt<unsigned, 31>;
|
||||
using DeclIDField = BCFixed<31>;
|
||||
|
||||
Reference in New Issue
Block a user