Files
swift-mirror/lib/SIL/Verifier/FlowSensitiveVerifier.h
Michael Gottesman c739308f2b [sil-verifier] Extract the flow sensitive verifier into its own file.
This has grown large enough and complex enough that it makes sense to go into
its own file.

This is a NFCI change. The only substantial changes is I added a small require
impl based on the one in SILVerifier and I eliminated the namespace
VerifyFlowSensitiveRulesDetails.
2025-12-02 12:45:23 -08:00

36 lines
1.2 KiB
C++

//===--- FlowSensitiveVerification.h --------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
#ifndef SWIFT_SIL_VERIFIER_FLOWSENSITIVEVERIFICATION_H
#define SWIFT_SIL_VERIFIER_FLOWSENSITIVEVERIFICATION_H
namespace swift {
class SILFunction;
namespace silverifier {
/// Verify the various control-flow-sensitive rules of SIL:
///
/// - stack allocations and deallocations must obey a stack discipline
/// - accesses must be uniquely ended
/// - async continuations must be awaited before getting the continuation again,
/// suspending
/// the task, or exiting the function
/// - flow-sensitive states must be equivalent on all paths into a block
void verifyFlowSensitiveRules(SILFunction *fn);
} // namespace silverifier
} // namespace swift
#endif