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 @@ -448,7 +448,7 @@ static bool metatypeUsesAreNotRelevant(MetatypeInst *mt) {
448
448
}
449
449
450
450
static bool allowedMetadataUseInEmbeddedSwift (SILInstruction *inst) {
451
- // Only diagnose metatype and value_metatype instructions, for now .
451
+ // Only diagnose metatype, value_metatype instructions, .. .
452
452
if ((isa<ValueMetatypeInst>(inst) || isa<MetatypeInst>(inst))) {
453
453
auto metaTy = cast<SingleValueInstruction>(inst)->getType ().castTo <MetatypeType>();
454
454
if (metaTy->getRepresentation () == MetatypeRepresentation::Thick) {
@@ -458,6 +458,9 @@ static bool allowedMetadataUseInEmbeddedSwift(SILInstruction *inst) {
458
458
// Class metadata are supported in embedded Swift
459
459
return instTy->getClassOrBoundGenericClass () ? true : false ;
460
460
}
461
+ // ... and alloc_ref_dynamic, for now.
462
+ } else if (isa<AllocRefDynamicInst>(inst)) {
463
+ return false ;
461
464
}
462
465
463
466
return true ;
You can’t perform that action at this time.
0 commit comments