SIL: Remove AllocBoxInst::getElementType().

There's no longer a single element type to speak of. Update uses to either iterate all box fields or to assert that they're working with a single-field box.
This commit is contained in:
Joe Groff
2016-12-02 16:20:14 -08:00
parent c46eb4c4a8
commit 13bb6c649a
7 changed files with 40 additions and 23 deletions

View File

@@ -1728,7 +1728,8 @@ public:
require(AI->getType().isObject(),
"result of alloc_box must be an object");
verifyOpenedArchetype(AI, AI->getElementType().getSwiftRValueType());
for (unsigned field : indices(AI->getBoxType()->getLayout()->getFields()))
verifyOpenedArchetype(AI, AI->getBoxType()->getFieldLoweredType(field));
}
void checkDeallocBoxInst(DeallocBoxInst *DI) {