File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
lib/SILOptimizer/Mandatory Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -458,7 +458,7 @@ static bool metatypeUsesAreNotRelevant(MetatypeInst *mt) {
458
458
}
459
459
460
460
static bool allowedMetadataUseInEmbeddedSwift (SILInstruction *inst) {
461
- // Only diagnose metatype and value_metatype instructions, for now .
461
+ // Only diagnose metatype, value_metatype instructions, .. .
462
462
if ((isa<ValueMetatypeInst>(inst) || isa<MetatypeInst>(inst))) {
463
463
auto metaTy = cast<SingleValueInstruction>(inst)->getType ().castTo <MetatypeType>();
464
464
if (metaTy->getRepresentation () == MetatypeRepresentation::Thick) {
@@ -468,6 +468,9 @@ static bool allowedMetadataUseInEmbeddedSwift(SILInstruction *inst) {
468
468
// Class metadata are supported in embedded Swift
469
469
return instTy->getClassOrBoundGenericClass () ? true : false ;
470
470
}
471
+ // ... and alloc_ref_dynamic, for now.
472
+ } else if (isa<AllocRefDynamicInst>(inst)) {
473
+ return false ;
471
474
}
472
475
473
476
return true ;
You can’t perform that action at this time.
0 commit comments