Skip to content

Commit cca31be

Browse files
committed
IRGen: Convert null pointer derefs into unconditional asserts
1 parent f8bf194 commit cca31be

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/IRGen/LocalTypeDataKind.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,19 +117,19 @@ class LocalTypeDataKind {
117117
/// same function.
118118
static LocalTypeDataKind
119119
forAbstractProtocolWitnessTable(ProtocolDecl *protocol) {
120-
assert(protocol && "protocol reference may not be null");
120+
ASSERT(protocol && "protocol reference may not be null");
121121
return LocalTypeDataKind(uintptr_t(protocol) | Kind_Decl);
122122
}
123123

124124
/// A reference to a protocol witness table for a concrete type.
125125
static LocalTypeDataKind
126126
forConcreteProtocolWitnessTable(ProtocolConformance *conformance) {
127-
assert(conformance && "conformance reference may not be null");
127+
ASSERT(conformance && "conformance reference may not be null");
128128
return LocalTypeDataKind(uintptr_t(conformance) | Kind_Conformance);
129129
}
130130

131131
static LocalTypeDataKind forProtocolWitnessTablePack(PackConformance *pack) {
132-
assert(pack && "pack conformance reference may not be null");
132+
ASSERT(pack && "pack conformance reference may not be null");
133133
return LocalTypeDataKind(uintptr_t(pack) | Kind_PackConformance);
134134
}
135135

0 commit comments

Comments
 (0)