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

@@ -130,7 +130,7 @@ bool canCastValueToABICompatibleType(SILModule &M,
/// Returns a project_box if it is the next instruction after \p ABI and
/// and has \p ABI as operand. Otherwise it creates a new project_box right
/// after \p ABI and returns it.
ProjectBoxInst *getOrCreateProjectBox(AllocBoxInst *ABI);
ProjectBoxInst *getOrCreateProjectBox(AllocBoxInst *ABI, unsigned Index);
/// Replace an apply with an instruction that produces the same value,
/// then delete the apply and the instructions that produce its callee