SIL: Add SuperToArchetypeInst.

Add an instruction to represent super-to-archetype downcasts. Since archetypes are address-only, it needs to take a reference to the destination archetype as a parameter.

Swift SVN r3643
This commit is contained in:
Joe Groff
2013-01-02 21:00:37 +00:00
parent 394172aafe
commit e7fc1d0bba
6 changed files with 43 additions and 0 deletions

View File

@@ -274,6 +274,11 @@ public:
void visitArchetypeToSuperInst(ArchetypeToSuperInst *CI) {
printConversionInst(CI, "archetype_to_super");
}
void visitSuperToArchetypeInst(SuperToArchetypeInst *I) {
OS << "super_to_archetype " << getID(I->getSrcBase()) << " to "
<< getID(I->getDestArchetypeAddress());
}
void visitTupleInst(TupleInst *TI) {
OS << "tuple (";