@@ -187,7 +187,7 @@ struct SILDeclRef {
187
187
// / True if this references a foreign entry point for the referenced decl.
188
188
unsigned isForeign : 1 ;
189
189
// / True if this references a distributed function.
190
- unsigned isDistributed : 1 ;
190
+ unsigned distributedThunk : 1 ;
191
191
// / True if this references a distributed function, but it is known to be local
192
192
unsigned isKnownToBeLocal : 1 ;
193
193
// / True is this reference to function that could be looked up via a special
@@ -231,7 +231,7 @@ struct SILDeclRef {
231
231
232
232
// / Produces a null SILDeclRef.
233
233
SILDeclRef ()
234
- : loc(), kind(Kind::Func), isForeign(0 ), isDistributed (0 ),
234
+ : loc(), kind(Kind::Func), isForeign(0 ), distributedThunk (0 ),
235
235
isKnownToBeLocal (0 ), isRuntimeAccessible(0 ),
236
236
backDeploymentKind(BackDeploymentKind::None), defaultArgIndex(0 ),
237
237
isAsyncLetClosure(0 ) {}
@@ -406,13 +406,13 @@ struct SILDeclRef {
406
406
friend llvm::hash_code hash_value (const SILDeclRef &ref) {
407
407
return llvm::hash_combine (
408
408
ref.loc .getOpaqueValue (), static_cast <int >(ref.kind ), ref.isForeign ,
409
- ref.isDistributed , ref.defaultArgIndex , ref.isAsyncLetClosure );
409
+ ref.distributedThunk , ref.defaultArgIndex , ref.isAsyncLetClosure );
410
410
}
411
411
412
412
bool operator ==(SILDeclRef rhs) const {
413
413
return loc.getOpaqueValue () == rhs.loc .getOpaqueValue () &&
414
414
kind == rhs.kind && isForeign == rhs.isForeign &&
415
- isDistributed == rhs.isDistributed &&
415
+ distributedThunk == rhs.distributedThunk &&
416
416
backDeploymentKind == rhs.backDeploymentKind &&
417
417
defaultArgIndex == rhs.defaultArgIndex && pointer == rhs.pointer &&
418
418
isAsyncLetClosure == rhs.isAsyncLetClosure ;
@@ -468,7 +468,7 @@ struct SILDeclRef {
468
468
469
469
// / Returns a copy of the decl with the given back deployment kind.
470
470
SILDeclRef asBackDeploymentKind (BackDeploymentKind backDeploymentKind) const {
471
- return SILDeclRef (loc.getOpaqueValue (), kind, isForeign, isDistributed ,
471
+ return SILDeclRef (loc.getOpaqueValue (), kind, isForeign, distributedThunk ,
472
472
isKnownToBeLocal, isRuntimeAccessible, backDeploymentKind,
473
473
defaultArgIndex, isAsyncLetClosure,
474
474
pointer.get <AutoDiffDerivativeFunctionIdentifier *>());
@@ -511,6 +511,9 @@ struct SILDeclRef {
511
511
// / True if the decl ref references a thunk handling potentially distributed actor functions
512
512
bool isDistributedThunk () const ;
513
513
514
+ // / True if the decl references a 'distributed' function.
515
+ bool isDistributed () const ;
516
+
514
517
// / True if the decl ref references a thunk handling a call to a function that
515
518
// / supports back deployment.
516
519
bool isBackDeploymentThunk () const ;
@@ -605,13 +608,13 @@ struct SILDeclRef {
605
608
friend struct llvm ::DenseMapInfo<swift::SILDeclRef>;
606
609
// / Produces a SILDeclRef from an opaque value.
607
610
explicit SILDeclRef (void *opaqueLoc, Kind kind, bool isForeign,
608
- bool isDistributed , bool isKnownToBeLocal,
611
+ bool isDistributedThunk , bool isKnownToBeLocal,
609
612
bool isRuntimeAccessible,
610
613
BackDeploymentKind backDeploymentKind,
611
614
unsigned defaultArgIndex, bool isAsyncLetClosure,
612
615
AutoDiffDerivativeFunctionIdentifier *derivativeId)
613
616
: loc(Loc::getFromOpaqueValue(opaqueLoc)), kind(kind),
614
- isForeign(isForeign), isDistributed(isDistributed ),
617
+ isForeign(isForeign), distributedThunk(isDistributedThunk ),
615
618
isKnownToBeLocal(isKnownToBeLocal),
616
619
isRuntimeAccessible(isRuntimeAccessible),
617
620
backDeploymentKind(backDeploymentKind),
@@ -655,7 +658,7 @@ template<> struct DenseMapInfo<swift::SILDeclRef> {
655
658
: 0 ;
656
659
unsigned h4 = UnsignedInfo::getHashValue (Val.isForeign );
657
660
unsigned h5 = PointerInfo::getHashValue (Val.pointer .getOpaqueValue ());
658
- unsigned h6 = UnsignedInfo::getHashValue (Val.isDistributed );
661
+ unsigned h6 = UnsignedInfo::getHashValue (Val.distributedThunk );
659
662
unsigned h7 = UnsignedInfo::getHashValue (unsigned (Val.backDeploymentKind ));
660
663
unsigned h8 = UnsignedInfo::getHashValue (Val.isKnownToBeLocal );
661
664
unsigned h9 = UnsignedInfo::getHashValue (Val.isRuntimeAccessible );
0 commit comments