Skip to content

Commit ecfa808

Browse files
committed
IRGen: convert two asserts to ASSERT to check the conditions also in a release-built compiler
1 parent 5212d92 commit ecfa808

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/swift/IRGen/Linking.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1123,7 +1123,7 @@ class LinkEntity {
11231123

11241124
static LinkEntity forProtocolWitnessTable(const ProtocolConformance *C) {
11251125
if (isEmbedded(C)) {
1126-
assert(C->getProtocol()->requiresClass());
1126+
ASSERT(C->getProtocol()->requiresClass());
11271127
}
11281128

11291129
LinkEntity entity;

lib/IRGen/GenProto.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3734,7 +3734,7 @@ llvm::Value *irgen::emitWitnessTableRef(IRGenFunction &IGF,
37343734

37353735
// In Embedded Swift, only class-bound wtables are allowed.
37363736
if (srcType->getASTContext().LangOpts.hasFeature(Feature::Embedded)) {
3737-
assert(proto->requiresClass());
3737+
ASSERT(proto->requiresClass());
37383738
}
37393739

37403740
assert(Lowering::TypeConverter::protocolRequiresWitnessTable(proto)

0 commit comments

Comments
 (0)