mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SIL: Add instructions to convert metatypes to object references.
Add objc_metatype_to_object and objc_existential_metatype_to_object to convert metatypes to AnyObject, and objc_protocol to get a reference to an @objc protocol descriptor as a Protocol class instance. Swift SVN r18824
This commit is contained in:
@@ -72,6 +72,7 @@ static bool isTransitiveEscapeInst(SILInstruction *Inst) {
|
||||
case ValueKind::LoadInst:
|
||||
case ValueKind::LoadWeakInst:
|
||||
case ValueKind::MetatypeInst:
|
||||
case ValueKind::ObjCProtocolInst:
|
||||
case ValueKind::SILGlobalAddrInst:
|
||||
case ValueKind::StoreInst:
|
||||
case ValueKind::StoreWeakInst:
|
||||
@@ -111,6 +112,8 @@ static bool isTransitiveEscapeInst(SILInstruction *Inst) {
|
||||
case ValueKind::InitEnumDataAddrInst:
|
||||
case ValueKind::InitExistentialInst:
|
||||
case ValueKind::InitExistentialRefInst:
|
||||
case ValueKind::ObjCExistentialMetatypeToObjectInst:
|
||||
case ValueKind::ObjCMetatypeToObjectInst:
|
||||
case ValueKind::ObjCToThickMetatypeInst:
|
||||
case ValueKind::UncheckedRefCastInst:
|
||||
case ValueKind::UncheckedAddrCastInst:
|
||||
|
||||
Reference in New Issue
Block a user