Skip to content

Commit 6554944

Browse files
committed
use the new ASSERT macro for two asserts which should also fire in a release-built compiler
1 parent c576015 commit 6554944

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/SIL/IR/OperandOwnership.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ static OperandOwnership getFunctionArgOwnership(SILArgumentConvention argConv,
510510
case SILArgumentConvention::Indirect_Out:
511511
case SILArgumentConvention::Indirect_Inout:
512512
case SILArgumentConvention::Indirect_InoutAliasable:
513-
llvm_unreachable("Illegal convention for non-address types");
513+
ASSERT(false && "Illegal convention for non-address types");
514514
}
515515
llvm_unreachable("covered switch");
516516
}

lib/SILOptimizer/Utils/Devirtualize.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ swift::devirtualizeClassMethod(SILPassManager *pm, FullApplySite applySite,
801801

802802
if (SILType errorTy = substConv.getIndirectErrorResultType(applySite.getFunction()->getTypeExpansionContext())) {
803803
auto errorArgs = applySite.getIndirectSILErrorResults();
804-
assert(errorArgs.size() == 1);
804+
ASSERT(errorArgs.size() == 1);
805805
SILValue errorArg = errorArgs[0];
806806
auto castRes = castValueToABICompatibleType(
807807
&builder, pm, loc, errorArg, errorArg->getType(),

0 commit comments

Comments
 (0)