@@ -70,12 +70,14 @@ namespace {
70
70
struct ArgumentDecoderInfo {
71
71
llvm::Value *Decoder;
72
72
73
- struct {
74
- CanSILFunctionType Type;
75
- FunctionPointer Fn;
76
- } DecodeMethod;
73
+ CanSILFunctionType MethodType;
74
+ FunctionPointer MethodPtr;
77
75
78
- CanSILFunctionType getMethodType () const { return DecodeMethod.Type ; }
76
+ ArgumentDecoderInfo (llvm::Value *decoder, CanSILFunctionType decodeMethodTy,
77
+ FunctionPointer decodePtr)
78
+ : Decoder(decoder), MethodType(decodeMethodTy), MethodPtr(decodePtr) {}
79
+
80
+ CanSILFunctionType getMethodType () const { return MethodType; }
79
81
80
82
// / Form a callee to a decode method - `decodeNextArgument`.
81
83
Callee getCallee () const ;
@@ -109,8 +111,6 @@ class DistributedAccessor {
109
111
// / Load an argument value from the given decoder \c decoder
110
112
// / to the given explosion \c arguments. Information describing
111
113
// / the type of argument comes from runtime metadata.
112
- // /
113
- // / Returns a pair of aligned offset and value size.
114
114
void decodeArgument (unsigned argumentIdx, const ArgumentDecoderInfo &decoder,
115
115
llvm::Value *argumentType, const SILParameterInfo ¶m,
116
116
Explosion &arguments);
@@ -657,8 +657,7 @@ DistributedAccessor::findArgumentDecoder(llvm::Value *decoder) {
657
657
classifyFunctionPointerKind (decodeSIL), fnPtr,
658
658
/* secondaryValue=*/ nullptr , signature);
659
659
660
- return {.Decoder = decoder,
661
- .DecodeMethod = {.Type = methodTy, .Fn = methodPtr}};
660
+ return {decoder, methodTy, methodPtr};
662
661
}
663
662
664
663
auto selfTy = methodTy->getSelfParameter ().getSILStorageType (
@@ -670,8 +669,7 @@ DistributedAccessor::findArgumentDecoder(llvm::Value *decoder) {
670
669
auto methodPtr =
671
670
emitVirtualMethodValue (IGF, metadata, SILDeclRef (decodeFn), methodTy);
672
671
673
- return {.Decoder = decoder,
674
- .DecodeMethod = {.Type = methodTy, .Fn = methodPtr}};
672
+ return {decoder, methodTy, methodPtr};
675
673
}
676
674
677
675
SILType DistributedAccessor::getResultType () const {
@@ -685,6 +683,6 @@ SILType DistributedAccessor::getErrorType() const {
685
683
}
686
684
687
685
Callee ArgumentDecoderInfo::getCallee () const {
688
- CalleeInfo info (DecodeMethod. Type , DecodeMethod. Type , SubstitutionMap ());
689
- return {std::move (info), DecodeMethod. Fn , Decoder};
686
+ CalleeInfo info (MethodType, MethodType , SubstitutionMap ());
687
+ return {std::move (info), MethodPtr , Decoder};
690
688
}
0 commit comments