mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Fix errors and warnings building swift/serialization on Windows with MSVC (#6024)
This commit is contained in:
committed by
Jordan Rose
parent
4c2d6e24ff
commit
dfa9536812
@@ -204,6 +204,8 @@ static const Decl *getDeclForContext(const DeclContext *DC) {
|
||||
case DeclContextKind::SubscriptDecl:
|
||||
return cast<SubscriptDecl>(DC);
|
||||
}
|
||||
|
||||
llvm_unreachable("Unhandled DeclContextKind in switch.");
|
||||
}
|
||||
|
||||
namespace {
|
||||
@@ -783,6 +785,8 @@ static uint8_t getRawStableDefaultArgumentKind(swift::DefaultArgumentKind kind)
|
||||
CASE(EmptyDictionary)
|
||||
#undef CASE
|
||||
}
|
||||
|
||||
llvm_unreachable("Unhandled DefaultArgumentKind in switch.");
|
||||
}
|
||||
|
||||
static uint8_t getRawStableMetatypeRepresentation(AnyMetatypeType *metatype) {
|
||||
@@ -934,6 +938,8 @@ static uint8_t getRawStableRequirementKind(RequirementKind kind) {
|
||||
CASE(SameType)
|
||||
}
|
||||
#undef CASE
|
||||
|
||||
llvm_unreachable("Unhandled RequirementKind in switch.");
|
||||
}
|
||||
|
||||
void Serializer::writeGenericRequirements(ArrayRef<Requirement> requirements,
|
||||
@@ -1283,6 +1289,8 @@ static uint8_t getRawStableOptionalTypeKind(swift::OptionalTypeKind kind) {
|
||||
return static_cast<uint8_t>(
|
||||
serialization::OptionalTypeKind::ImplicitlyUnwrappedOptional);
|
||||
}
|
||||
|
||||
llvm_unreachable("Unhandled OptionalTypeKind in switch.");
|
||||
}
|
||||
|
||||
static bool shouldSerializeMember(Decl *D) {
|
||||
@@ -1320,6 +1328,8 @@ static bool shouldSerializeMember(Decl *D) {
|
||||
case DeclKind::Func:
|
||||
return true;
|
||||
}
|
||||
|
||||
llvm_unreachable("Unhandled DeclKind in switch.");
|
||||
}
|
||||
|
||||
void Serializer::writeMembers(DeclRange members, bool isClass) {
|
||||
@@ -1386,6 +1396,8 @@ static serialization::AccessorKind getStableAccessorKind(swift::AccessorKind K){
|
||||
CASE(MutableAddressor)
|
||||
#undef CASE
|
||||
}
|
||||
|
||||
llvm_unreachable("Unhandled AccessorKind in switch.");
|
||||
}
|
||||
|
||||
static serialization::CtorInitializerKind
|
||||
@@ -1399,6 +1411,8 @@ getStableCtorInitializerKind(swift::CtorInitializerKind K){
|
||||
CASE(ConvenienceFactory)
|
||||
#undef CASE
|
||||
}
|
||||
|
||||
llvm_unreachable("Unhandled CtorInitializerKind in switch.");
|
||||
}
|
||||
|
||||
void Serializer::writeCrossReference(const DeclContext *DC, uint32_t pathLen) {
|
||||
@@ -1613,6 +1627,8 @@ static uint8_t getRawStableAssociativity(swift::Associativity assoc) {
|
||||
case swift::Associativity::None:
|
||||
return serialization::Associativity::NonAssociative;
|
||||
}
|
||||
|
||||
llvm_unreachable("Unhandled Associativity in switch.");
|
||||
}
|
||||
|
||||
static serialization::StaticSpellingKind
|
||||
@@ -1625,6 +1641,8 @@ getStableStaticSpelling(swift::StaticSpellingKind SS) {
|
||||
case swift::StaticSpellingKind::KeywordClass:
|
||||
return serialization::StaticSpellingKind::KeywordClass;
|
||||
}
|
||||
|
||||
llvm_unreachable("Unhandled StaticSpellingKind in switch.");
|
||||
}
|
||||
|
||||
static uint8_t getRawStableAccessibility(Accessibility access) {
|
||||
@@ -1639,6 +1657,8 @@ static uint8_t getRawStableAccessibility(Accessibility access) {
|
||||
CASE(Open)
|
||||
#undef CASE
|
||||
}
|
||||
|
||||
llvm_unreachable("Unhandled AccessibilityKind in switch.");
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@@ -2029,6 +2049,8 @@ static ForeignErrorConventionKind getRawStableForeignErrorConventionKind(
|
||||
case ForeignErrorConvention::NonNilError:
|
||||
return ForeignErrorConventionKind::NonNilError;
|
||||
}
|
||||
|
||||
llvm_unreachable("Unhandled ForeignErrorConvention in switch.");
|
||||
}
|
||||
|
||||
void Serializer::writeForeignErrorConvention(const ForeignErrorConvention &fec){
|
||||
|
||||
Reference in New Issue
Block a user