SIL: Give project_box a field index operand.

Allow project_box to get the address of any field in a multi-field box.
This commit is contained in:
Joe Groff
2016-10-21 16:01:06 -07:00
parent 374fa57530
commit e4c67e2d5a
62 changed files with 694 additions and 648 deletions

View File

@@ -1774,7 +1774,7 @@ void LifetimeChecker::processUninitializedRelease(SILInstruction *Release,
// since the pointer it contains will be manually cleaned up.
auto *ABI = dyn_cast<AllocBoxInst>(Release->getOperand(0));
if (ABI)
Pointer = getOrCreateProjectBox(ABI);
Pointer = getOrCreateProjectBox(ABI, 0);
if (!consumed) {
if (Pointer->getType().isAddress())