Add a new semantics attribute to disable SIL verification on a function

This provides a way to disable verification per function instead of the entire module.
This commit is contained in:
Meghana Gupta
2025-05-14 15:38:59 -07:00
parent 294e4cf21b
commit aa01b2ad06
5 changed files with 35 additions and 5 deletions

View File

@@ -7419,6 +7419,10 @@ void SILFunction::verify(CalleeCache *calleeCache,
if (!verificationEnabled(getModule()))
return;
if (hasSemanticsAttr(semantics::NO_SIL_VERIFICATION)) {
return;
}
// Please put all checks in visitSILFunction in SILVerifier, not here. This
// ensures that the pretty stack trace in the verifier is included with the
// back trace when the verifier crashes.