Skip to content

Commit 26b9e0e

Browse files
authored
Merge pull request swiftlang#33815 from gottesmm/pr-0bf456cc2c826eabf3ff3e5543d3539e96b7d29d
2 parents 38e724b + 4fa57ae commit 26b9e0e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/Serialization/SerializeSIL.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,12 @@ namespace {
248248
void writeSILBlock(const SILModule *SILMod);
249249
void writeIndexTables();
250250

251+
void writeNoOperandLayout(const SILInstruction *I) {
252+
unsigned abbrCode = SILAbbrCodes[SILInstNoOperandLayout::Code];
253+
SILInstNoOperandLayout::emitRecord(Out, ScratchRecord, abbrCode,
254+
(unsigned)I->getKind());
255+
}
256+
251257
void writeConversionLikeInstruction(const SingleValueInstruction *I,
252258
unsigned attrs);
253259
void writeOneTypeLayout(SILInstructionKind valueKind,
@@ -763,9 +769,7 @@ void SILSerializer::writeSILInstruction(const SILInstruction &SI) {
763769

764770
case SILInstructionKind::UnwindInst:
765771
case SILInstructionKind::UnreachableInst: {
766-
unsigned abbrCode = SILAbbrCodes[SILInstNoOperandLayout::Code];
767-
SILInstNoOperandLayout::emitRecord(Out, ScratchRecord, abbrCode,
768-
(unsigned)SI.getKind());
772+
writeNoOperandLayout(&SI);
769773
break;
770774
}
771775
case SILInstructionKind::AllocExistentialBoxInst:

0 commit comments

Comments
 (0)