Skip to content

Commit 476890c

Browse files
authored
Merge pull request #34312 from CodaFi/just-keep-passing-the-open-windows
Silence a Raft of Warnings from the Windows Build
2 parents 0d8f689 + 0d6a162 commit 476890c

19 files changed

+31
-3
lines changed

include/swift/AST/Decl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3762,6 +3762,7 @@ struct SelfReferencePosition final {
37623762
case Contravariant:
37633763
return Covariant;
37643764
}
3765+
llvm_unreachable("unhandled self reference position!");
37653766
}
37663767

37673768
explicit operator bool() const { return kind > None; }

include/swift/AST/ForeignErrorConvention.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ class ForeignErrorConvention {
198198
case NonNilError:
199199
return false;
200200
}
201+
llvm_unreachable("unhandled foreign error kind!");
201202
}
202203

203204
bool operator==(ForeignErrorConvention other) const {

include/swift/Demangling/TypeLookupError.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ class TypeLookupError {
150150
delete castContext;
151151
return nullptr;
152152
}
153+
llvm_unreachable("unhandled command!");
153154
};
154155
}
155156

include/swift/Sema/ConstraintSystem.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1907,6 +1907,7 @@ class SolutionApplicationTarget {
19071907
case Kind::patternBinding:
19081908
return patternBinding;
19091909
}
1910+
llvm_unreachable("invalid case label type");
19101911
}
19111912

19121913
VarDecl *getAsUninitializedWrappedVar() const {
@@ -1921,6 +1922,7 @@ class SolutionApplicationTarget {
19211922
case Kind::uninitializedWrappedVar:
19221923
return uninitializedWrappedVar;
19231924
}
1925+
llvm_unreachable("invalid case label type");
19241926
}
19251927

19261928
BraceStmt *getFunctionBody() const {

lib/AST/AutoDiff.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,7 @@ bool swift::operator==(const TangentPropertyInfo::Error &lhs,
462462
case TangentPropertyInfo::Error::Kind::TangentPropertyWrongType:
463463
return lhs.getType()->isEqual(rhs.getType());
464464
}
465+
llvm_unreachable("unhandled tangent property!");
465466
}
466467

467468
void swift::simple_display(llvm::raw_ostream &os, TangentPropertyInfo info) {

lib/AST/ClangTypeConverter.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ const clang::Type *ClangTypeConverter::getFunctionType(
207207
case SILFunctionType::Representation::Closure:
208208
llvm_unreachable("Expected a C-compatible representation.");
209209
}
210+
llvm_unreachable("unhandled representation!");
210211
}
211212

212213
clang::QualType ClangTypeConverter::convertMemberType(NominalTypeDecl *DC,

lib/AST/TypeCheckRequests.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1497,6 +1497,7 @@ bool ActorIsolation::requiresSubstitution() const {
14971497
case GlobalActor:
14981498
return getGlobalActor()->hasTypeParameter();
14991499
}
1500+
llvm_unreachable("unhandled actor isolation kind!");
15001501
}
15011502

15021503
ActorIsolation ActorIsolation::subst(SubstitutionMap subs) const {
@@ -1509,6 +1510,7 @@ ActorIsolation ActorIsolation::subst(SubstitutionMap subs) const {
15091510
case GlobalActor:
15101511
return forGlobalActor(getGlobalActor().subst(subs));
15111512
}
1513+
llvm_unreachable("unhandled actor isolation kind!");
15121514
}
15131515

15141516
void swift::simple_display(

lib/Driver/DarwinToolChains.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,7 @@ bool jobMatchesFilter(LinkKind jobKind, BackDeployLibFilter filter) {
364364
case BackDeployLibFilter::all:
365365
return true;
366366
}
367+
llvm_unreachable("unhandled back deploy lib filter!");
367368
}
368369

369370
}

lib/IDE/APIDigesterData.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ StringRef swift::ide::api::getDeclKindStr(const DeclKind Value, bool lower) {
5656
}
5757
#include "swift/AST/DeclNodes.def"
5858
}
59+
llvm_unreachable("Unhandled DeclKind in switch.");
5960
} else {
6061
return getDeclKindStrRaw(Value);
6162
}

lib/IRGen/GenCall.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ namespace {
10151015
llvm::Type *convertVectorType(clang::CanQual<clang::VectorType> type) {
10161016
auto eltTy =
10171017
convertBuiltinType(type->getElementType().castAs<clang::BuiltinType>());
1018-
return llvm::VectorType::get(eltTy, type->getNumElements());
1018+
return llvm::FixedVectorType::get(eltTy, type->getNumElements());
10191019
}
10201020

10211021
llvm::Type *convertBuiltinType(clang::CanQual<clang::BuiltinType> type) {

lib/IRGen/GenType.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,7 +1216,7 @@ TypeConverter::createPrimitiveForAlignedPointer(llvm::PointerType *type,
12161216
Alignment align,
12171217
Alignment pointerAlignment) {
12181218
SpareBitVector spareBits = IGM.TargetInfo.PointerSpareBits;
1219-
for (unsigned bit = 0; Alignment(1 << bit) != pointerAlignment; ++bit) {
1219+
for (unsigned bit = 0; Alignment(1ull << bit) != pointerAlignment; ++bit) {
12201220
spareBits.setBit(bit);
12211221
}
12221222

@@ -1872,7 +1872,7 @@ convertPrimitiveBuiltin(IRGenModule &IGM, CanType canTy) {
18721872
= convertPrimitiveBuiltin(IGM,
18731873
vecTy->getElementType()->getCanonicalType());
18741874

1875-
auto llvmVecTy = llvm::VectorType::get(elementTy, vecTy->getNumElements());
1875+
auto llvmVecTy = llvm::FixedVectorType::get(elementTy, vecTy->getNumElements());
18761876
unsigned bitSize = size.getValue() * vecTy->getNumElements() * 8;
18771877
if (!llvm::isPowerOf2_32(bitSize))
18781878
bitSize = llvm::NextPowerOf2(bitSize);

lib/IRGen/IRGenSIL.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,6 +1219,13 @@ class SyncNativeCCEntryPointArgumentEmission final
12191219
llvm::Value *getCoroutineBuffer() override {
12201220
return allParamValues.claimNext();
12211221
}
1222+
1223+
public:
1224+
using SyncEntryPointArgumentEmission::requiresIndirectResult;
1225+
using SyncEntryPointArgumentEmission::getIndirectResultForFormallyDirectResult;
1226+
using SyncEntryPointArgumentEmission::getIndirectResult;
1227+
using SyncEntryPointArgumentEmission::getNextPolymorphicParameterAsMetadata;
1228+
using SyncEntryPointArgumentEmission::getNextPolymorphicParameter;
12221229
};
12231230

12241231
class AsyncNativeCCEntryPointArgumentEmission final

lib/IRGen/MetadataLayout.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,7 @@ ClassMetadataLayout::getMethodInfo(IRGenFunction &IGF, SILDeclRef method) const{
414414
case MethodInfo::Kind::DirectImpl:
415415
return MethodInfo(stored.TheImpl);
416416
}
417+
llvm_unreachable("unhandled method info kind!");
417418
}
418419

419420
Offset ClassMetadataLayout::getFieldOffset(IRGenFunction &IGF,

lib/IRGen/MetadataRequest.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,7 @@ static MetadataResponse emitNominalPrespecializedGenericMetadataRef(
616616
return MetadataResponse::handle(IGF, request, call);
617617
}
618618
}
619+
llvm_unreachable("unhandled metadata canonicality");
619620
}
620621

621622
static llvm::Value *

lib/SILOptimizer/Differentiation/PullbackCloner.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ class PullbackCloner::Implementation final
336336
case AdjointValueKind::Concrete:
337337
return val.getConcreteValue();
338338
}
339+
llvm_unreachable("unhandled adjoint value kind!");
339340
}
340341

341342
/// Materializes an adjoint value indirectly to a SIL buffer.

lib/SILOptimizer/SemanticARC/OwnershipPhiOperand.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ class LLVM_LIBRARY_VISIBILITY OwnershipPhiOperand {
8888
case Kind::Struct:
8989
return false;
9090
}
91+
llvm_unreachable("unhandled operand kind!");
9192
}
9293

9394
bool operator<(const OwnershipPhiOperand &other) const {
@@ -113,6 +114,7 @@ class LLVM_LIBRARY_VISIBILITY OwnershipPhiOperand {
113114
});
114115
}
115116
}
117+
llvm_unreachable("unhandled operand kind!");
116118
}
117119
};
118120

lib/SILOptimizer/Transforms/AllocBoxToStack.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -984,6 +984,7 @@ specializeApplySite(SILOptFunctionBuilder &FuncBuilder, ApplySite Apply,
984984
GenericSpecializationInformation::create(ApplyInst, Builder));
985985
}
986986
}
987+
llvm_unreachable("unhandled apply inst kind!");
987988
}
988989

989990
static void rewriteApplySites(AllocBoxToStackState &pass) {

lib/Sema/TypeCheckConcurrency.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,7 @@ void swift::checkActorIsolation(const Expr *expr, const DeclContext *dc) {
825825
// Okay.
826826
return false;
827827
}
828+
llvm_unreachable("unhandled actor isolation kind!");
828829
}
829830

830831
/// Check a reference to a local or global.
@@ -868,6 +869,7 @@ void swift::checkActorIsolation(const Expr *expr, const DeclContext *dc) {
868869
case ActorIsolationRestriction::Unsafe:
869870
return diagnoseReferenceToUnsafe(value, loc);
870871
}
872+
llvm_unreachable("unhandled actor isolation kind!");
871873
}
872874

873875
/// Check a reference with the given base expression to the given member.
@@ -964,6 +966,7 @@ void swift::checkActorIsolation(const Expr *expr, const DeclContext *dc) {
964966
case ActorIsolationRestriction::Unsafe:
965967
return diagnoseReferenceToUnsafe(member, memberLoc);
966968
}
969+
llvm_unreachable("unhandled actor isolation kind!");
967970
}
968971
};
969972

lib/Sema/TypeCheckRequestFunctions.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ static Type inferFunctionBuilderType(ValueDecl *decl) {
262262
case DynamicReplacement:
263263
return dynamicReplacement->getName();
264264
}
265+
llvm_unreachable("unhandled decl name kind!");
265266
}
266267
};
267268

0 commit comments

Comments
 (0)