Skip to content

Commit 5ee55ea

Browse files
committed
Add unreachable in readLoc
1 parent 0b2ef9c commit 5ee55ea

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/Serialization/DeserializeSIL.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -430,9 +430,7 @@ SILDeserializer::readLoc(unsigned kind, SmallVectorImpl<uint64_t> &scratch) {
430430
case SILLocation::RegularKind:
431431
return RegularLocation(FNameLoc, Implicit);
432432
}
433-
434-
// LocationKind was not a recognized SILLocation::LocationKind.
435-
return std::nullopt;
433+
llvm_unreachable("Invalid LocationKind");
436434
}
437435

438436
llvm::Expected<const SILDebugScope *>

0 commit comments

Comments
 (0)