mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Revert "SIL: Drop the upcast_existential* instructions."
This reverts commit r22345. Swift SVN r22353
This commit is contained in:
@@ -713,13 +713,18 @@ void SILSerializer::writeSILInstruction(const SILInstruction &SI) {
|
||||
break;
|
||||
}
|
||||
case ValueKind::IndexAddrInst:
|
||||
case ValueKind::IndexRawPointerInst: {
|
||||
case ValueKind::IndexRawPointerInst:
|
||||
case ValueKind::UpcastExistentialInst: {
|
||||
SILValue operand, operand2;
|
||||
unsigned Attr = 0;
|
||||
if (SI.getKind() == ValueKind::IndexRawPointerInst) {
|
||||
const IndexRawPointerInst *IRP = cast<IndexRawPointerInst>(&SI);
|
||||
operand = IRP->getBase();
|
||||
operand2 = IRP->getIndex();
|
||||
} else if (SI.getKind() == ValueKind::UpcastExistentialInst) {
|
||||
Attr = cast<UpcastExistentialInst>(&SI)->isTakeOfSrc();
|
||||
operand = cast<UpcastExistentialInst>(&SI)->getSrcExistential();
|
||||
operand2 = cast<UpcastExistentialInst>(&SI)->getDestExistential();
|
||||
} else {
|
||||
const IndexAddrInst *IAI = cast<IndexAddrInst>(&SI);
|
||||
operand = IAI->getBase();
|
||||
@@ -879,6 +884,7 @@ void SILSerializer::writeSILInstruction(const SILInstruction &SI) {
|
||||
case ValueKind::ThickToObjCMetatypeInst:
|
||||
case ValueKind::ObjCToThickMetatypeInst:
|
||||
case ValueKind::ConvertFunctionInst:
|
||||
case ValueKind::UpcastExistentialRefInst:
|
||||
case ValueKind::ObjCMetatypeToObjectInst:
|
||||
case ValueKind::ObjCExistentialMetatypeToObjectInst:
|
||||
case ValueKind::ProjectBlockStorageInst: {
|
||||
|
||||
Reference in New Issue
Block a user