Skip to content

Commit 17deae8

Browse files
authored
Merge pull request #37487 from gottesmm/release/5.4-77325585
[5.4][sil][debug-info] Turn off a few asserts just on 5.4 to eliminate some crashes in user code.
2 parents 275278e + c923ea4 commit 17deae8

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/SIL/Verifier/SILVerifier.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,6 +1214,16 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
12141214
}
12151215
}
12161216

1217+
// Disable these checks just on 5.4 when compiler asserts are enabled.
1218+
//
1219+
// These just verify some things about debug info that shouldn't stop a program
1220+
// from not-compiling. When optimizing in certain cases, we found that we were
1221+
// hitting these on linux platforms since on linux platforms, we ship the
1222+
// compiler with assertions enabled. So by disabling this we can at least at
1223+
// the expense of slightly worse debug info when compiling with optimization
1224+
// eliminate these crashes. Darwin does not ship with compiler-asserts so is
1225+
// unaffected.
1226+
#if 0
12171227
// Regular locations are allowed on all instructions.
12181228
if (LocKind == SILLocation::RegularKind)
12191229
return;
@@ -1228,6 +1238,7 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
12281238
if (LocKind == SILLocation::ArtificialUnreachableKind)
12291239
require(InstKind == SILInstructionKind::UnreachableInst,
12301240
"artificial locations are only allowed on Unreachable instructions");
1241+
#endif
12311242
}
12321243

12331244
/// Check that the types of this value producer are all legal in the function

0 commit comments

Comments
 (0)