File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ class LinkEntity {
132132 // / ValueDecl*, SILFunction*, or TypeBase*, depending on Kind.
133133 void *Pointer;
134134
135- // / ProtocolConformance*, depending on Kind.
135+ // / ProtocolConformance* or SILDifferentiabilityWitness* , depending on Kind.
136136 void *SecondaryPointer;
137137
138138 // / A hand-rolled bitfield with the following layout:
@@ -772,8 +772,8 @@ class LinkEntity {
772772 void
773773 setForDifferentiabilityWitness (Kind kind,
774774 const SILDifferentiabilityWitness *witness) {
775- Pointer = const_cast < void *>( static_cast < const void *>(witness)) ;
776- SecondaryPointer = nullptr ;
775+ Pointer = nullptr ;
776+ SecondaryPointer = const_cast < void *>( static_cast < const void *>(witness)) ;
777777 Data = LINKENTITY_SET_FIELD (Kind, unsigned (kind));
778778 }
779779
@@ -1684,7 +1684,7 @@ class LinkEntity {
16841684
16851685 SILDifferentiabilityWitness *getSILDifferentiabilityWitness () const {
16861686 assert (getKind () == Kind::DifferentiabilityWitness);
1687- return reinterpret_cast <SILDifferentiabilityWitness *>(Pointer );
1687+ return reinterpret_cast <SILDifferentiabilityWitness *>(SecondaryPointer );
16881688 }
16891689
16901690 const RootProtocolConformance *getRootProtocolConformance () const {
Original file line number Diff line number Diff line change @@ -1449,7 +1449,7 @@ bool IRGenModule::IsWellKnownBuiltinOrStructralType(CanType T) const {
14491449 T == Context.getAnyObjectType ())
14501450 return true ;
14511451
1452- if (auto IntTy = dyn_cast <BuiltinIntegerType>(T)) {
1452+ if (auto IntTy = dyn_cast_or_null <BuiltinIntegerType>(T)) {
14531453 auto Width = IntTy->getWidth ();
14541454 if (Width.isPointerWidth ())
14551455 return true ;
You can’t perform that action at this time.
0 commit comments