@@ -59,6 +59,10 @@ enum IsExactSelfClass_t {
5959 IsNotExactSelfClass,
6060 IsExactSelfClass,
6161};
62+ enum IsDistributed_t {
63+ IsNotDistributed,
64+ IsDistributed,
65+ };
6266
6367enum class PerformanceConstraints : uint8_t {
6468 None = 0 ,
@@ -294,6 +298,9 @@ class SILFunction
294298 // / invoked with a `self` argument of the exact base class type.
295299 unsigned ExactSelfClass : 1 ;
296300
301+ // / Check whether this is a distributed method.
302+ unsigned IsDistributed : 1 ;
303+
297304 // / True if this function is inlined at least once. This means that the
298305 // / debug info keeps a pointer to this function.
299306 unsigned Inlined : 1 ;
@@ -373,14 +380,16 @@ class SILFunction
373380 SubclassScope classSubclassScope, Inline_t inlineStrategy,
374381 EffectsKind E, const SILDebugScope *debugScope,
375382 IsDynamicallyReplaceable_t isDynamic,
376- IsExactSelfClass_t isExactSelfClass);
383+ IsExactSelfClass_t isExactSelfClass,
384+ IsDistributed_t isDistributed);
377385
378386 static SILFunction *
379387 create (SILModule &M, SILLinkage linkage, StringRef name,
380388 CanSILFunctionType loweredType, GenericEnvironment *genericEnv,
381389 Optional<SILLocation> loc, IsBare_t isBareSILFunction,
382390 IsTransparent_t isTrans, IsSerialized_t isSerialized,
383391 ProfileCounter entryCount, IsDynamicallyReplaceable_t isDynamic,
392+ IsDistributed_t isDistributed,
384393 IsExactSelfClass_t isExactSelfClass,
385394 IsThunk_t isThunk = IsNotThunk,
386395 SubclassScope classSubclassScope = SubclassScope::NotApplicable,
@@ -399,7 +408,8 @@ class SILFunction
399408 Inline_t inlineStrategy, EffectsKind E,
400409 const SILDebugScope *DebugScope,
401410 IsDynamicallyReplaceable_t isDynamic,
402- IsExactSelfClass_t isExactSelfClass);
411+ IsExactSelfClass_t isExactSelfClass,
412+ IsDistributed_t isDistributed);
403413
404414 // / Set has ownership to the given value. True means that the function has
405415 // / ownership, false means it does not.
@@ -747,6 +757,14 @@ class SILFunction
747757 ExactSelfClass = t;
748758 }
749759
760+ IsDistributed_t isDistributed () const {
761+ return IsDistributed_t (IsDistributed);
762+ }
763+ void
764+ setIsDistributed (IsDistributed_t value = IsDistributed_t::IsDistributed) {
765+ IsDistributed = value;
766+ }
767+
750768 // / Get the DeclContext of this function.
751769 DeclContext *getDeclContext () const { return DeclCtxt; }
752770
0 commit comments