[SIL] Add dead_end flag to destroy_value.

This commit is contained in:
Nate Chandler
2024-07-01 17:51:11 -07:00
parent 91fe12aab4
commit a8cc3bfdda
15 changed files with 200 additions and 21 deletions

View File

@@ -2323,12 +2323,13 @@ bool SILDeserializer::readSILInstruction(SILFunction *Fn,
case SILInstructionKind::DestroyValueInst: {
assert(RecordKind == SIL_ONE_OPERAND && "Layout should be OneOperand.");
PoisonRefs_t poisonRefs = PoisonRefs_t(Attr & 0x1);
IsDeadEnd_t isDeadEnd = IsDeadEnd_t((Attr >> 1) & 0x1);
ResultInst = Builder.createDestroyValue(
Loc,
getLocalValue(
Builder.maybeGetFunction(), ValID,
getSILType(MF->getType(TyID), (SILValueCategory)TyCategory, Fn)),
poisonRefs);
poisonRefs, isDeadEnd);
break;
}