@@ -384,7 +384,9 @@ void DistributedAccessor::decodeArgument(unsigned argumentIdx,
384
384
llvm::Value *argumentType,
385
385
const SILParameterInfo ¶m,
386
386
Explosion &arguments) {
387
- auto ¶mInfo = IGM.getTypeInfo (param.getSILStorageInterfaceType ());
387
+ auto paramTy = Target->mapTypeIntoContext (param.getSILStorageInterfaceType ());
388
+
389
+ auto ¶mInfo = IGM.getTypeInfo (paramTy);
388
390
// TODO: `emitLoad*` would actually load value witness table every
389
391
// time it's called, which is sub-optimal but all of the APIs that
390
392
// deal with value witness tables are currently hidden in GenOpaque.cpp
@@ -496,7 +498,6 @@ void DistributedAccessor::decodeArgument(unsigned argumentIdx,
496
498
497
499
case ParameterConvention::Direct_Guaranteed:
498
500
case ParameterConvention::Direct_Unowned: {
499
- auto paramTy = param.getSILStorageInterfaceType ();
500
501
Address eltPtr = IGF.Builder .CreateElementBitCast (
501
502
resultValue.getAddress (), IGM.getStorageType (paramTy));
502
503
@@ -506,11 +507,12 @@ void DistributedAccessor::decodeArgument(unsigned argumentIdx,
506
507
}
507
508
508
509
case ParameterConvention::Direct_Owned: {
510
+ assert (false && " owned" );
509
511
// Copy the value out at +1.
510
512
cast<LoadableTypeInfo>(paramInfo).loadAsCopy (IGF, resultValue.getAddress (),
511
513
arguments);
512
- LoadedArguments.push_back (std::make_pair (
513
- resultValue.getAddress (), param. getSILStorageInterfaceType () ));
514
+ LoadedArguments.push_back (
515
+ std::make_pair ( resultValue.getAddress (), paramTy ));
514
516
break ;
515
517
}
516
518
}
0 commit comments