File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -262,6 +262,7 @@ class SILTypeProperties {
262262 return MayHaveCustomDeinit_t ((Flags & CustomDeinitFlag) != 0 );
263263 }
264264
265+ void setTrivial () { Flags &= ~NonTrivialFlag; }
265266 void setNonTrivial () { Flags |= NonTrivialFlag; }
266267 void setIsOrContainsRawPointer () { Flags |= HasRawPointerFlag; }
267268
Original file line number Diff line number Diff line change @@ -775,8 +775,14 @@ namespace {
775775 type, getReferenceSILTypeProperties (isSensitive));
776776 }
777777 }
778- return asImpl ().handleAddressOnly (
779- type, getOpaqueSILTypeProperties (isSensitive));
778+ auto props = getOpaqueSILTypeProperties (isSensitive);
779+ if (ProtocolDecl *bitwiseCopyable =
780+ TC.Context .getProtocol (KnownProtocolKind::BitwiseCopyable)) {
781+ // Archetypes only have unconditional conformance.
782+ if (lookupConformance (type, bitwiseCopyable))
783+ props.setTrivial ();
784+ }
785+ return asImpl ().handleAddressOnly (type, props);
780786 }
781787
782788 RetTy visitExistentialType (CanType type,
You can’t perform that action at this time.
0 commit comments