mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Fix errors and warnings building swift/SIL on Windows using MSVC
This commit is contained in:
@@ -104,7 +104,7 @@ Projection::Projection(SILInstruction *I) : Value() {
|
||||
}
|
||||
case ValueKind::ProjectBoxInst: {
|
||||
auto *PBI = cast<ProjectBoxInst>(I);
|
||||
Value = ValueTy(ProjectionKind::Box, (unsigned)0);
|
||||
Value = ValueTy(ProjectionKind::Box, static_cast<uintptr_t>(0));
|
||||
assert(getKind() == ProjectionKind::Box);
|
||||
assert(getIndex() == 0);
|
||||
assert(getType(PBI->getOperand()->getType(), PBI->getModule()) ==
|
||||
@@ -228,6 +228,8 @@ Projection::createObjectProjection(SILBuilder &B, SILLocation Loc,
|
||||
case ProjectionKind::BitwiseCast:
|
||||
return B.createUncheckedBitwiseCast(Loc, Base, getCastType(BaseTy));
|
||||
}
|
||||
|
||||
llvm_unreachable("Unhandled ProjectionKind in switch.");
|
||||
}
|
||||
|
||||
NullablePtr<SILInstruction>
|
||||
@@ -270,6 +272,8 @@ Projection::createAddressProjection(SILBuilder &B, SILLocation Loc,
|
||||
case ProjectionKind::BitwiseCast:
|
||||
return B.createUncheckedAddrCast(Loc, Base, getCastType(BaseTy));
|
||||
}
|
||||
|
||||
llvm_unreachable("Unhandled ProjectionKind in switch.");
|
||||
}
|
||||
|
||||
void Projection::getFirstLevelProjections(SILType Ty, SILModule &Mod,
|
||||
|
||||
Reference in New Issue
Block a user