SILGen: Use resilience expansion when deciding if we need to use materializeForSet or not

This commit is contained in:
Slava Pestov
2017-11-09 15:28:15 -08:00
parent 773e6bff56
commit 0b895bbf44
2 changed files with 17 additions and 4 deletions

View File

@@ -1146,10 +1146,8 @@ namespace {
// If the declaration is in a different resilience domain, we have
// to use materializeForSet.
//
// FIXME: Use correct ResilienceExpansion if SGF is @transparent
if (!decl->hasFixedLayout(SGF.SGM.M.getSwiftModule(),
ResilienceExpansion::Maximal))
SGF.F.getResilienceExpansion()))
return true;
// If the declaration is dynamically dispatched through a class,