mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SILVerifier - option to verify with or without linear lifetime check
Add a separate 'verifyOwnership()' entry point so it's possible to check OSSA lifetimes at various points. Move SILGenCleanup into a SILGen pass pipeline. After SILGen, verify incomplete OSSA. After SILGenCleanup, verify ownership.
This commit is contained in:
@@ -904,7 +904,17 @@ public:
|
||||
|
||||
/// Run the SIL verifier to make sure that all Functions follow
|
||||
/// invariants.
|
||||
void verify() const;
|
||||
void verify(bool isCompleteOSSA = true,
|
||||
bool checkLinearLifetime = true) const;
|
||||
|
||||
/// Run the SIL verifier without assuming OSSA lifetimes end at dead end
|
||||
/// blocks.
|
||||
void verifyIncompleteOSSA() const {
|
||||
verify(/*isCompleteOSSA=*/false);
|
||||
}
|
||||
|
||||
/// Check linear OSSA lifetimes, assuming complete OSSA.
|
||||
void verifyOwnership() const;
|
||||
|
||||
/// Check if there are any leaking instructions.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user