Skip to content

Commit

Permalink
Merge pull request swiftlang#34312 from CodaFi/just-keep-passing-the-…
Browse files Browse the repository at this point in the history
…open-windows

Silence a Raft of Warnings from the Windows Build
  • Loading branch information
CodaFi committed Oct 15, 2020
2 parents 0d8f689 + 0d6a162 commit 476890c
Show file tree
Hide file tree
Showing 19 changed files with 31 additions and 3 deletions.
1 change: 1 addition & 0 deletions include/swift/AST/Decl.h
Original file line number Diff line number Diff line change
Expand Up @@ -3762,6 +3762,7 @@ struct SelfReferencePosition final {
case Contravariant:
return Covariant;
}
llvm_unreachable("unhandled self reference position!");
}

explicit operator bool() const { return kind > None; }
Expand Down
1 change: 1 addition & 0 deletions include/swift/AST/ForeignErrorConvention.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ class ForeignErrorConvention {
case NonNilError:
return false;
}
llvm_unreachable("unhandled foreign error kind!");
}

bool operator==(ForeignErrorConvention other) const {
Expand Down
1 change: 1 addition & 0 deletions include/swift/Demangling/TypeLookupError.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ class TypeLookupError {
delete castContext;
return nullptr;
}
llvm_unreachable("unhandled command!");
};
}

Expand Down
2 changes: 2 additions & 0 deletions include/swift/Sema/ConstraintSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -1907,6 +1907,7 @@ class SolutionApplicationTarget {
case Kind::patternBinding:
return patternBinding;
}
llvm_unreachable("invalid case label type");
}

VarDecl *getAsUninitializedWrappedVar() const {
Expand All @@ -1921,6 +1922,7 @@ class SolutionApplicationTarget {
case Kind::uninitializedWrappedVar:
return uninitializedWrappedVar;
}
llvm_unreachable("invalid case label type");
}

BraceStmt *getFunctionBody() const {
Expand Down
1 change: 1 addition & 0 deletions lib/AST/AutoDiff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ bool swift::operator==(const TangentPropertyInfo::Error &lhs,
case TangentPropertyInfo::Error::Kind::TangentPropertyWrongType:
return lhs.getType()->isEqual(rhs.getType());
}
llvm_unreachable("unhandled tangent property!");
}

void swift::simple_display(llvm::raw_ostream &os, TangentPropertyInfo info) {
Expand Down
1 change: 1 addition & 0 deletions lib/AST/ClangTypeConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ const clang::Type *ClangTypeConverter::getFunctionType(
case SILFunctionType::Representation::Closure:
llvm_unreachable("Expected a C-compatible representation.");
}
llvm_unreachable("unhandled representation!");
}

clang::QualType ClangTypeConverter::convertMemberType(NominalTypeDecl *DC,
Expand Down
2 changes: 2 additions & 0 deletions lib/AST/TypeCheckRequests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1497,6 +1497,7 @@ bool ActorIsolation::requiresSubstitution() const {
case GlobalActor:
return getGlobalActor()->hasTypeParameter();
}
llvm_unreachable("unhandled actor isolation kind!");
}

ActorIsolation ActorIsolation::subst(SubstitutionMap subs) const {
Expand All @@ -1509,6 +1510,7 @@ ActorIsolation ActorIsolation::subst(SubstitutionMap subs) const {
case GlobalActor:
return forGlobalActor(getGlobalActor().subst(subs));
}
llvm_unreachable("unhandled actor isolation kind!");
}

void swift::simple_display(
Expand Down
1 change: 1 addition & 0 deletions lib/Driver/DarwinToolChains.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ bool jobMatchesFilter(LinkKind jobKind, BackDeployLibFilter filter) {
case BackDeployLibFilter::all:
return true;
}
llvm_unreachable("unhandled back deploy lib filter!");
}

}
Expand Down
1 change: 1 addition & 0 deletions lib/IDE/APIDigesterData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ StringRef swift::ide::api::getDeclKindStr(const DeclKind Value, bool lower) {
}
#include "swift/AST/DeclNodes.def"
}
llvm_unreachable("Unhandled DeclKind in switch.");
} else {
return getDeclKindStrRaw(Value);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/IRGen/GenCall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ namespace {
llvm::Type *convertVectorType(clang::CanQual<clang::VectorType> type) {
auto eltTy =
convertBuiltinType(type->getElementType().castAs<clang::BuiltinType>());
return llvm::VectorType::get(eltTy, type->getNumElements());
return llvm::FixedVectorType::get(eltTy, type->getNumElements());
}

llvm::Type *convertBuiltinType(clang::CanQual<clang::BuiltinType> type) {
Expand Down
4 changes: 2 additions & 2 deletions lib/IRGen/GenType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,7 @@ TypeConverter::createPrimitiveForAlignedPointer(llvm::PointerType *type,
Alignment align,
Alignment pointerAlignment) {
SpareBitVector spareBits = IGM.TargetInfo.PointerSpareBits;
for (unsigned bit = 0; Alignment(1 << bit) != pointerAlignment; ++bit) {
for (unsigned bit = 0; Alignment(1ull << bit) != pointerAlignment; ++bit) {
spareBits.setBit(bit);
}

Expand Down Expand Up @@ -1872,7 +1872,7 @@ convertPrimitiveBuiltin(IRGenModule &IGM, CanType canTy) {
= convertPrimitiveBuiltin(IGM,
vecTy->getElementType()->getCanonicalType());

auto llvmVecTy = llvm::VectorType::get(elementTy, vecTy->getNumElements());
auto llvmVecTy = llvm::FixedVectorType::get(elementTy, vecTy->getNumElements());
unsigned bitSize = size.getValue() * vecTy->getNumElements() * 8;
if (!llvm::isPowerOf2_32(bitSize))
bitSize = llvm::NextPowerOf2(bitSize);
Expand Down
7 changes: 7 additions & 0 deletions lib/IRGen/IRGenSIL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1219,6 +1219,13 @@ class SyncNativeCCEntryPointArgumentEmission final
llvm::Value *getCoroutineBuffer() override {
return allParamValues.claimNext();
}

public:
using SyncEntryPointArgumentEmission::requiresIndirectResult;
using SyncEntryPointArgumentEmission::getIndirectResultForFormallyDirectResult;
using SyncEntryPointArgumentEmission::getIndirectResult;
using SyncEntryPointArgumentEmission::getNextPolymorphicParameterAsMetadata;
using SyncEntryPointArgumentEmission::getNextPolymorphicParameter;
};

class AsyncNativeCCEntryPointArgumentEmission final
Expand Down
1 change: 1 addition & 0 deletions lib/IRGen/MetadataLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ ClassMetadataLayout::getMethodInfo(IRGenFunction &IGF, SILDeclRef method) const{
case MethodInfo::Kind::DirectImpl:
return MethodInfo(stored.TheImpl);
}
llvm_unreachable("unhandled method info kind!");
}

Offset ClassMetadataLayout::getFieldOffset(IRGenFunction &IGF,
Expand Down
1 change: 1 addition & 0 deletions lib/IRGen/MetadataRequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@ static MetadataResponse emitNominalPrespecializedGenericMetadataRef(
return MetadataResponse::handle(IGF, request, call);
}
}
llvm_unreachable("unhandled metadata canonicality");
}

static llvm::Value *
Expand Down
1 change: 1 addition & 0 deletions lib/SILOptimizer/Differentiation/PullbackCloner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ class PullbackCloner::Implementation final
case AdjointValueKind::Concrete:
return val.getConcreteValue();
}
llvm_unreachable("unhandled adjoint value kind!");
}

/// Materializes an adjoint value indirectly to a SIL buffer.
Expand Down
2 changes: 2 additions & 0 deletions lib/SILOptimizer/SemanticARC/OwnershipPhiOperand.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ class LLVM_LIBRARY_VISIBILITY OwnershipPhiOperand {
case Kind::Struct:
return false;
}
llvm_unreachable("unhandled operand kind!");
}

bool operator<(const OwnershipPhiOperand &other) const {
Expand All @@ -113,6 +114,7 @@ class LLVM_LIBRARY_VISIBILITY OwnershipPhiOperand {
});
}
}
llvm_unreachable("unhandled operand kind!");
}
};

Expand Down
1 change: 1 addition & 0 deletions lib/SILOptimizer/Transforms/AllocBoxToStack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,7 @@ specializeApplySite(SILOptFunctionBuilder &FuncBuilder, ApplySite Apply,
GenericSpecializationInformation::create(ApplyInst, Builder));
}
}
llvm_unreachable("unhandled apply inst kind!");
}

static void rewriteApplySites(AllocBoxToStackState &pass) {
Expand Down
3 changes: 3 additions & 0 deletions lib/Sema/TypeCheckConcurrency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,7 @@ void swift::checkActorIsolation(const Expr *expr, const DeclContext *dc) {
// Okay.
return false;
}
llvm_unreachable("unhandled actor isolation kind!");
}

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

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

Expand Down
1 change: 1 addition & 0 deletions lib/Sema/TypeCheckRequestFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ static Type inferFunctionBuilderType(ValueDecl *decl) {
case DynamicReplacement:
return dynamicReplacement->getName();
}
llvm_unreachable("unhandled decl name kind!");
}
};

Expand Down

0 comments on commit 476890c

Please sign in to comment.