Merge pull request #71803 from jckarter/begin-borrow-fixed-switch-subject

SIL: Enclose switch subjects in a new begin_borrow [fixed] variant.
This commit is contained in:
Joe Groff
2024-02-22 14:45:17 -08:00
committed by GitHub
14 changed files with 100 additions and 35 deletions

View File

@@ -1572,7 +1572,8 @@ void SILSerializer::writeSILInstruction(const SILInstruction &SI) {
} else if (auto *BBI = dyn_cast<BeginBorrowInst>(&SI)) {
Attr = unsigned(BBI->isLexical()) |
(unsigned(BBI->hasPointerEscape() << 1)) |
(unsigned(BBI->isFromVarDecl() << 2));
(unsigned(BBI->isFromVarDecl() << 2)) |
(unsigned(BBI->isFixed() << 3));
} else if (auto *MVI = dyn_cast<MoveValueInst>(&SI)) {
Attr = unsigned(MVI->getAllowDiagnostics()) |
(unsigned(MVI->isLexical() << 1)) |