Skip to content

Commit bf0ab47

Browse files
committed
format
1 parent 735e35d commit bf0ab47

File tree

2 files changed

+36
-18
lines changed

2 files changed

+36
-18
lines changed

lib/Serialization/Deserialization.cpp

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,8 @@ void ModuleFile::readGenericRequirements(
723723
break;
724724

725725
scratch.clear();
726-
unsigned recordID = fatalIfUnexpected(DeclTypeCursor.readRecord(entry.ID, scratch, &blobData));
726+
unsigned recordID = fatalIfUnexpected(
727+
DeclTypeCursor.readRecord(entry.ID, scratch, &blobData));
727728
switch (recordID) {
728729
case GENERIC_REQUIREMENT: {
729730
uint8_t rawKind;
@@ -909,7 +910,8 @@ GenericSignature *ModuleFile::getGenericSignature(
909910
return nullptr;
910911
}
911912

912-
unsigned recordID = fatalIfUnexpected(DeclTypeCursor.readRecord(entry.ID, scratch, &blobData));
913+
unsigned recordID = fatalIfUnexpected(
914+
DeclTypeCursor.readRecord(entry.ID, scratch, &blobData));
913915
if (recordID != GENERIC_SIGNATURE) {
914916
error();
915917
return nullptr;
@@ -991,7 +993,8 @@ ModuleFile::getGenericSignatureOrEnvironment(
991993
if (entry.Kind != llvm::BitstreamEntry::Record)
992994
return result;
993995

994-
unsigned recordID = fatalIfUnexpected(DeclTypeCursor.readRecord(entry.ID, scratch, &blobData));
996+
unsigned recordID = fatalIfUnexpected(
997+
DeclTypeCursor.readRecord(entry.ID, scratch, &blobData));
995998
if (recordID != SIL_GENERIC_ENVIRONMENT) {
996999
error();
9971000
return result;
@@ -1093,7 +1096,8 @@ SubstitutionMap ModuleFile::getSubstitutionMap(
10931096

10941097
StringRef blobData;
10951098
SmallVector<uint64_t, 8> scratch;
1096-
unsigned recordID = fatalIfUnexpected(DeclTypeCursor.readRecord(entry.ID, scratch, &blobData));
1099+
unsigned recordID = fatalIfUnexpected(
1100+
DeclTypeCursor.readRecord(entry.ID, scratch, &blobData));
10971101
if (recordID != SUBSTITUTION_MAP) {
10981102
error();
10991103
return SubstitutionMap();
@@ -1311,7 +1315,8 @@ ModuleFile::resolveCrossReference(ModuleID MID, uint32_t pathLen) {
13111315
// In particular, operator path pieces represent actual operators here, but
13121316
// filters on operator functions when they appear later on.
13131317
scratch.clear();
1314-
unsigned recordID = fatalIfUnexpected(DeclTypeCursor.readRecord(entry.ID, scratch, &blobData));
1318+
unsigned recordID = fatalIfUnexpected(
1319+
DeclTypeCursor.readRecord(entry.ID, scratch, &blobData));
13151320
switch (recordID) {
13161321
case XREF_TYPE_PATH_PIECE:
13171322
case XREF_VALUE_PATH_PIECE: {
@@ -1421,7 +1426,8 @@ ModuleFile::resolveCrossReference(ModuleID MID, uint32_t pathLen) {
14211426
return Identifier();
14221427

14231428
scratch.clear();
1424-
unsigned recordID = fatalIfUnexpected(DeclTypeCursor.readRecord(entry.ID, scratch, &blobData));
1429+
unsigned recordID = fatalIfUnexpected(
1430+
DeclTypeCursor.readRecord(entry.ID, scratch, &blobData));
14251431
switch (recordID) {
14261432
case XREF_TYPE_PATH_PIECE: {
14271433
IdentifierID IID;
@@ -1492,7 +1498,8 @@ ModuleFile::resolveCrossReference(ModuleID MID, uint32_t pathLen) {
14921498
}
14931499

14941500
scratch.clear();
1495-
unsigned recordID = fatalIfUnexpected(DeclTypeCursor.readRecord(entry.ID, scratch, &blobData));
1501+
unsigned recordID = fatalIfUnexpected(
1502+
DeclTypeCursor.readRecord(entry.ID, scratch, &blobData));
14961503
switch (recordID) {
14971504
case XREF_TYPE_PATH_PIECE: {
14981505
if (values.size() == 1 && isa<NominalTypeDecl>(values.front())) {
@@ -1904,7 +1911,8 @@ DeclContext *ModuleFile::getLocalDeclContext(DeclContextID DCID) {
19041911
SmallVector<uint64_t, 64> scratch;
19051912
StringRef blobData;
19061913

1907-
unsigned recordID = fatalIfUnexpected(DeclTypeCursor.readRecord(entry.ID, scratch, &blobData));
1914+
unsigned recordID = fatalIfUnexpected(
1915+
DeclTypeCursor.readRecord(entry.ID, scratch, &blobData));
19081916
switch(recordID) {
19091917
case decls_block::ABSTRACT_CLOSURE_EXPR_CONTEXT: {
19101918
TypeID closureTypeID;
@@ -1994,7 +2002,8 @@ DeclContext *ModuleFile::getDeclContext(DeclContextID DCID) {
19942002
SmallVector<uint64_t, 64> scratch;
19952003
StringRef blobData;
19962004

1997-
unsigned recordID = fatalIfUnexpected(DeclTypeCursor.readRecord(entry.ID, scratch, &blobData));
2005+
unsigned recordID = fatalIfUnexpected(
2006+
DeclTypeCursor.readRecord(entry.ID, scratch, &blobData));
19982007

19992008
if (recordID != decls_block::DECL_CONTEXT)
20002009
llvm_unreachable("Expected a DECL_CONTEXT record");
@@ -4017,7 +4026,8 @@ llvm::Error DeclDeserializer::deserializeDeclAttributes() {
40174026
return llvm::Error::success();
40184027
}
40194028

4020-
unsigned recordID = MF.fatalIfUnexpected(MF.DeclTypeCursor.readRecord(entry.ID, scratch, &blobData));
4029+
unsigned recordID = MF.fatalIfUnexpected(
4030+
MF.DeclTypeCursor.readRecord(entry.ID, scratch, &blobData));
40214031

40224032
if (isDeclAttrRecord(recordID)) {
40234033
DeclAttribute *Attr = nullptr;
@@ -4329,7 +4339,8 @@ DeclDeserializer::getDeclCheckedImpl() {
43294339

43304340
SmallVector<uint64_t, 64> scratch;
43314341
StringRef blobData;
4332-
unsigned recordID = MF.fatalIfUnexpected(MF.DeclTypeCursor.readRecord(entry.ID, scratch, &blobData));
4342+
unsigned recordID = MF.fatalIfUnexpected(
4343+
MF.DeclTypeCursor.readRecord(entry.ID, scratch, &blobData));
43334344

43344345
PrettyDeclDeserialization stackTraceEntry(
43354346
&MF, declOrOffset, static_cast<decls_block::RecordKind>(recordID));
@@ -4712,7 +4723,8 @@ class swift::TypeDeserializer {
47124723
break;
47134724

47144725
scratch.clear();
4715-
unsigned recordID = MF.fatalIfUnexpected(MF.DeclTypeCursor.readRecord(entry.ID, scratch, &blobData));
4726+
unsigned recordID = MF.fatalIfUnexpected(
4727+
MF.DeclTypeCursor.readRecord(entry.ID, scratch, &blobData));
47164728
if (recordID != decls_block::TUPLE_TYPE_ELT)
47174729
break;
47184730

@@ -4773,7 +4785,8 @@ class swift::TypeDeserializer {
47734785
break;
47744786

47754787
scratch.clear();
4776-
unsigned recordID = MF.fatalIfUnexpected(MF.DeclTypeCursor.readRecord(entry.ID, scratch, &blobData));
4788+
unsigned recordID = MF.fatalIfUnexpected(
4789+
MF.DeclTypeCursor.readRecord(entry.ID, scratch, &blobData));
47774790
if (recordID != decls_block::FUNCTION_PARAM)
47784791
break;
47794792

@@ -5362,7 +5375,8 @@ Expected<Type> TypeDeserializer::getTypeCheckedImpl() {
53625375

53635376
SmallVector<uint64_t, 64> scratch;
53645377
StringRef blobData;
5365-
unsigned recordID = MF.fatalIfUnexpected(MF.DeclTypeCursor.readRecord(entry.ID, scratch, &blobData));
5378+
unsigned recordID = MF.fatalIfUnexpected(
5379+
MF.DeclTypeCursor.readRecord(entry.ID, scratch, &blobData));
53665380

53675381
switch (recordID) {
53685382
#define CASE(RECORD_NAME) \
@@ -5823,7 +5837,8 @@ Optional<StringRef> ModuleFile::maybeReadInlinableBodyText() {
58235837
if (next.Kind != llvm::BitstreamEntry::Record)
58245838
return None;
58255839

5826-
unsigned recKind = fatalIfUnexpected(DeclTypeCursor.readRecord(next.ID, scratch, &blobData));
5840+
unsigned recKind =
5841+
fatalIfUnexpected(DeclTypeCursor.readRecord(next.ID, scratch, &blobData));
58275842
if (recKind != INLINABLE_BODY_TEXT)
58285843
return None;
58295844

@@ -5843,7 +5858,8 @@ Optional<ForeignErrorConvention> ModuleFile::maybeReadForeignErrorConvention() {
58435858
if (next.Kind != llvm::BitstreamEntry::Record)
58445859
return None;
58455860

5846-
unsigned recKind = fatalIfUnexpected(DeclTypeCursor.readRecord(next.ID, scratch));
5861+
unsigned recKind =
5862+
fatalIfUnexpected(DeclTypeCursor.readRecord(next.ID, scratch));
58475863
switch (recKind) {
58485864
case FOREIGN_ERROR_CONVENTION:
58495865
restoreOffset.reset();

lib/Serialization/DeserializeSIL.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ SILDeserializer::SILDeserializer(
157157
SmallVector<uint64_t, 4> scratch;
158158
StringRef blobData;
159159
unsigned prevKind = kind;
160-
kind = MF->fatalIfUnexpected(cursor.readRecord(next.ID, scratch, &blobData));
160+
kind =
161+
MF->fatalIfUnexpected(cursor.readRecord(next.ID, scratch, &blobData));
161162
assert((next.Kind == llvm::BitstreamEntry::Record &&
162163
kind > prevKind &&
163164
(kind == sil_index_block::SIL_FUNC_NAMES ||
@@ -189,7 +190,8 @@ SILDeserializer::SILDeserializer(
189190
// Read SIL_FUNC|VTABLE|GLOBALVAR_OFFSETS record.
190191
next = MF->fatalIfUnexpected(cursor.advance());
191192
scratch.clear();
192-
unsigned offKind = MF->fatalIfUnexpected(cursor.readRecord(next.ID, scratch, &blobData));
193+
unsigned offKind =
194+
MF->fatalIfUnexpected(cursor.readRecord(next.ID, scratch, &blobData));
193195
(void)offKind;
194196
if (kind == sil_index_block::SIL_FUNC_NAMES) {
195197
assert((next.Kind == llvm::BitstreamEntry::Record &&

0 commit comments

Comments
 (0)