@@ -394,8 +394,8 @@ SILDeserializer::readNextRecord(SmallVectorImpl<uint64_t> &scratch) {
394
394
return maybeKind;
395
395
}
396
396
397
- std::optional<SILLocation> SILDeserializer::readLoc ( unsigned kind,
398
- SmallVectorImpl<uint64_t > &scratch) {
397
+ std::optional<SILLocation>
398
+ SILDeserializer::readLoc ( unsigned kind, SmallVectorImpl<uint64_t > &scratch) {
399
399
unsigned LocationKind, Implicit = 0 ;
400
400
SILLocation::FilenameAndLocation *FNameLoc = nullptr ;
401
401
// Each SourceLoc opaque pointer is serialized once. Successive appearences
@@ -409,27 +409,30 @@ std::optional<SILLocation> SILDeserializer::readLoc(unsigned kind,
409
409
FNameLoc = ParsedLocs[LocID - 1 ];
410
410
} else {
411
411
ValueID Row = 0 , Col = 0 , FNameID = 0 ;
412
- SourceLocLayout::readRecord (scratch, Row, Col, FNameID, LocationKind, Implicit);
413
-
412
+ SourceLocLayout::readRecord (scratch, Row, Col, FNameID, LocationKind,
413
+ Implicit);
414
414
415
415
FNameLoc = SILLocation::FilenameAndLocation::alloc (
416
416
Row, Col, MF->getIdentifierText (FNameID), SILMod);
417
417
418
418
ParsedLocs.push_back (FNameLoc);
419
419
}
420
420
421
- switch (LocationKind) {
422
- case SILLocation::ReturnKind:
423
- return ReturnLocation (FNameLoc, Implicit);
424
- case SILLocation::ImplicitReturnKind:
425
- return ImplicitReturnLocation (FNameLoc, Implicit);
426
- case SILLocation::InlinedKind:
427
- case SILLocation::MandatoryInlinedKind:
428
- case SILLocation::CleanupKind:
429
- case SILLocation::ArtificialUnreachableKind:
430
- case SILLocation::RegularKind:
431
- return RegularLocation (FNameLoc, Implicit);
421
+ switch (LocationKind) {
422
+ case SILLocation::ReturnKind:
423
+ return ReturnLocation (FNameLoc, Implicit);
424
+ case SILLocation::ImplicitReturnKind:
425
+ return ImplicitReturnLocation (FNameLoc, Implicit);
426
+ case SILLocation::InlinedKind:
427
+ case SILLocation::MandatoryInlinedKind:
428
+ case SILLocation::CleanupKind:
429
+ case SILLocation::ArtificialUnreachableKind:
430
+ case SILLocation::RegularKind:
431
+ return RegularLocation (FNameLoc, Implicit);
432
432
}
433
+
434
+ // LocationKind was not a recognized SILLocation::LocationKind.
435
+ return std::nullopt;
433
436
}
434
437
435
438
llvm::Expected<const SILDebugScope *>
0 commit comments